多表统计,如何得出统计结果的和 我要统计两个表,计算两个表数据的和,SQL如下所示select count(*) num from logreadtableunion allselect count(*) num from logprinttable结果如下: num 2 11如何得出这两个查询结果的和,就是2+11=13? 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 select count(1) from (select 1 as cnt from logreadtableunion allselect 1 as cnt from logprinttable) t; select sum(num) from (select count(*) num from logreadtableunion allselect count(*) num from logprinttable); select count(*) num from logreadtable,logprinttable也可以 ORACLE 行列转换问题 Oracle导入imp时,报错:IMP-00016: 不支持要求的字符集转换(从类型31到852) oracle sqlloader 导入数据问题 求助sql语言的词法分析,语法分析方面的资料 Oracle 查询数据问题 想考“数据库应用技术”方向的研究生,请问这个方向的研究生? 请问如何判断oracle中long raw字段的长度? 跨越表空间的插入操作 oracle权限问题 is not a valid date and time Oracle时间类型问题报错 请问Oracle中如何显示表空间的名字 100求ORACLEdba期末复习题
select 1 as cnt from logreadtable
union all
select 1 as cnt from logprinttable
) t;
select count(*) num from logreadtable
union all
select count(*) num from logprinttable
);
也可以