Query to find how many records in your database

Posted by Kirthiga under Sql Server category on | Points: 40 | Views : 861
select t.name [TableName],r.rowcnt [RowCount] 
from sysobjects t join sysindexes r on t.id=r.id
where r.indid in (0,1) and xtype='U' and t.name<>'sysdiagrams'
order by r.rowcnt desc compute sum(r.rowcnt)

Comments or Responses

Login to post response