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也有类似的系统表