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