This script will gives row number for every table in database.
USE AdventureWorks
GOSELECT OBJECT_NAME(OBJECT_ID) TableName, st.row_countFROM sys.dm_db_partition_stats stWHERE index_id < 2ORDER BY st.row_count DESCGO
No comments:
Post a Comment