上面写法修正为: select (select count(*) from a), (select count(*) from b) from dual。
select max(a) a,max(b) b from ( select count(*) a,null b from a union all select null,count(*) from b )c
SQLWKS> select (select count(*) from enterprise),(select count(*) from sell_enterprise) from dual; select (select count(*) from enterprise),(select count(*) from sell_enterprise) from dual * ORA-00936: 缺少表达式 ------------------ 这是按livingwhale() 写的结果。
呵呵:) 该问题遭到了解决,楼上可以得分,但是。我要告诉你正确答案。呵呵:) select b.c,f.d from (select count(*) c from sell_enterprise) b,(select count(*) d from enterprise) f
select (select count(*) from a), (select count(*) from b)
from dual。
from
(
select count(*) a,null b from a
union all
select null,count(*) from b
)c
select (select count(*) from enterprise),(select count(*) from sell_enterprise) from dual
*
ORA-00936: 缺少表达式
------------------
这是按livingwhale() 写的结果。
select b.c,f.d from (select count(*) c from sell_enterprise) b,(select count(*) d from enterprise) f