An Idea can change your life.....

Tuesday, December 11, 2007

Get record count for every table in a DB

SELECT o.name TableName,

i.rows TblRowCount

FROM sysobjects o

INNER JOIN sysindexes i

ON (o.id = i.id)

WHERE o.xtype = 'u'

AND i.indid < 2

No comments: