SELECT object_name (i.id) TableName,
rows as RowCnt
FROM sysindexes i
INNER JOIN sysObjects o
ON (o.id = i.id AND o.xType = ‘U ‘)
WHERE indid < 2
ORDER BY RowCnt desc,TableName
查询所有表的记录数SQLServer
时间: 2024-10-09 06:38:54
SELECT object_name (i.id) TableName,
rows as RowCnt
FROM sysindexes i
INNER JOIN sysObjects o
ON (o.id = i.id AND o.xType = ‘U ‘)
WHERE indid < 2
ORDER BY RowCnt desc,TableName
查询所有表的记录数SQLServer