Skip to content

Gary Sieling

Software Engineer

  • Machine Learning
  • Full Text Search
  • Data Science
  • Scraping
  • Postgres
  • DevOps
  • AWS
  • Talks

Tag: databases

Posted on 2015-07-25

Finding the number of rows of all tables in a SQL Server database

The following query finds all tables in a schema, ordered by row count:

SELECT
    sysobjects.*
    , sysindexes.Rows
FROM
    sysobjects
    INNER JOIN sysindexes
    ON sysobjects.id = sysindexes.id
WHERE
    type = 'U'
    AND sysindexes.IndId < 2
ORDER BY sysindexes.Rows desc

Posts navigation

Previous page Page 1 … Page 46 Page 47 Page 48 … Page 72 Next page

Post Views: 1

  • Thought Experiments
  • Proof of Concepts
  • Book Reviews
  • Projects
  • Essays
  • Talks
  • Programming Techniques
  • Javascript
  • Python
  • Prolog
  • Scala
  • Java
  • PHP
  • C#
  • R

Recent Posts

  • The accelerant effects of AI
  • Allow a CircleCI self-hosted machine runner to run jobs for more than 5 hrs
  • Import a folder of CSVs into a single Google Sheet (1 per tab)
  • R Code to summarize Dept of Ed, Civil Rights Data by school district / LEA
  • Export Census ACS5 data by GEOID/block group to CSV in R
Proudly powered by WordPress