Search This Blog

Wednesday, 23 July 2014

SQL SERVER – Find Row Count in Table – Find Largest Table in Database – T-SQL‏

USE AdventureWorks
GO
SELECT 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