Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有 700 个表,我想知道使用 dbvisualizer 的每个表的记录数。
怎样才能做到简单有效?帮我。
尝试这个:
SELECT SUM(TABLE_ROWS) FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA = '{database}';
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