sql Get row counts

USE slickcms
SELECT OBJECT_NAME(OBJECT_ID) TableName, st.row_count
FROM sys.dm_db_partition_stats st
WHERE index_id < 2
ORDER BY st.row_count DESC
Gets the count of rows within each table in a database.

Updated: Friday 8th October 2010, 11:19pm

There are 0 comments

Leave a comment of your own

Comments are currently closed.