테이블들의 Row Count 가져오기!

Posted by Alvin You
2014. 3. 22. 22:20 SQL Server

SELECT [TableName] = so.name,
[RowCount] = MAX(si.rows)
FROM sysobjects so, sysindexes si
WHERE so.xtype = 'U' AND si.id = OBJECT_ID(so.name)
GROUP BY so.name ORDER BY 2 DESC