Answer: Write below query:-
Write below queries:-
select convert(bigint,rows)
from sysindexes
where id = object_id('Test1')
and indid < 2;
--OR--
select sum(row_count)
from sys.dm_db_partition_stats
WHERE object_id=OBJECT_ID('Test1')
AND (index_id = 0 or index_id = 1);
Asked In: Many Interviews |
Alert Moderator