среда, 25 ноября 2020 г.

SQL: get number of records for all tables in Database

 Below you may find easist way to get number of records per table in your database. Sometimes it's extremely needed.


select t.name TableName, i.rows  numberofRecords

from sysobjects t

join sysindexes i

on t.id = i.id

where t.xtype = 'U' 

and i.indid in (0,1)

order by TableName;


I hope it'll be helpful for you :)

Комментариев нет:

Отправить комментарий