SQL 查询数据库表的行数

SELECT a.name, b.rows
FROM sys.sysobjects AS a INNER JOIN
sys.sysindexes AS b ON a.id = b.id
WHERE (b.indid IN (0, 1)) AND (a.type = 'u')
ORDER BY b.rows DESC

posted @ 2020-01-07 13:57  星畔  阅读(4559)  评论(0编辑  收藏  举报