Oracle - 相关

1.两个 count(1) 相减

Method1:
    select 
        (select count(1) from t1) - (select count(1) from t2) as result
    from dual
Method2:
    select
        t1.t - t2.t
    from
        (select count(1) t from t1) t1,
        (select count(1) t from t2) t2

持续更新中…..

猜你喜欢

转载自blog.csdn.net/u012204535/article/details/81216973