我有700个表,我想知道使用dbvisualizer的每个表的记录数。
怎么做简单有效?帮助我。
答案 0 :(得分:0)
试试这个:
SELECT SUM(TABLE_ROWS) FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA = '{database}';
答案 1 :(得分:0)
SELECT distinct t.name, p.rows
FROM sys.tables AS t
INNER JOIN sys.partitions AS p
ON t.object_id = p.object_id
ORDER BY t.name