Technical Article

Get Table Count without using COUNT

,

Returns the number of records within a table without having to perform COUNT.

declare @table_name varvhar(255)
set @table_name = 'tbl_tmp'
select rows from sysindexes 
where id = OBJECT_ID(@table_name) and  
indid < 2

Rate

You rated this post out of 5. Change rating

Share

Share

Rate

You rated this post out of 5. Change rating