select "a" name, count(1)
from tableA
union
select "b" name, count(1)
from tableB
union
select "C" name, count(1)
from tableC
採用多列的寫法
with
temp_a as (select count(*) num from talbeA),
temp_b as (select count(*) num from tableB),
temp_c as (select count(*) num from tableC)
select temp_a.num, temp_b.num, temp_c.num from dual;
Mysql的 select table_rows from information_schema.TABLES where table_schema in ('schema1','schema2','scheman') and table_name in ('tableName1','tableName2','tableNameN') 相信 oralce也有類似的系統表
採用多列的寫法
這樣?
Mysql
Oracle
在以上語句後面加 from dual
Mysql的
select table_rows from information_schema.TABLES where table_schema in ('schema1','schema2','scheman') and table_name in ('tableName1','tableName2','tableNameN')
相信 oralce也有類似的系統表