テーブルごとのレコード件数を数える
とりあえず対象のテーブル名をいちいち書く
SELECT 'table1' AS table_name , COUNT(*) FROM table1 UNION SELECT 'table2' AS table_name , COUNT(*) FROM table2 UNION SELECT 'table3' AS table_name , COUNT(*) FROM table3 ... ORDER BY table_name ;
とりあえず対象のテーブル名をいちいち書く
SELECT 'table1' AS table_name , COUNT(*) FROM table1 UNION SELECT 'table2' AS table_name , COUNT(*) FROM table2 UNION SELECT 'table3' AS table_name , COUNT(*) FROM table3 ... ORDER BY table_name ;