Monday, May 24, 2010, 09:15 AM
Posted by Administrator
The most common method used for this is shows below. Posted by Administrator
SELECT COUNT(*) FROM tablename
The same can be acheived by using the builtin SP
EXEC sp_spaceused 'tablename'
To get revords counts and its size of all the tables then use following(#Ballpark: because the sysindex table is not updated constantly.)
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




( 3.1 / 204 )

Calendar



