Here is the query which is not only quick but reliable enough to retrieve accurate number of rows in a very large table like a table with 2,000,000,000,000+ rows table :) SELECT SUM (row_count) FROM sys.dm_db_partition_stats WHERE object_id=OBJECT_ID('<table name>') AND (index_id=0 or index_id=1);
c926b89e-4a6b-49ba-b931-e417ffc572b1|1|5.0
SQL Server