Oracle 两个count(1)相减的两种方法

--方法一
select(select count(1) from 表1)
-(select count(1) from 表2)
from dual

--方法二
select  a.a-b.b from
(select count(1) a from 表1) a,
(select count(1) b from 表2) b 
posted @ 2020-04-30 09:37  虫昔竹毛小新  阅读(1521)  评论(0)    收藏  举报