求个简单sql
假设我有两个sql
1、select count(1) from A; 结果100
2、select count(1) from B; 结果200
我怎么用一个sql把这两个结果同时得到:
count(1) count(1)
100 200
感谢~~~~
------解决方案--------------------
SQL code
SELECT
(select count(1) from A) AS totA,
(select count(1) from B) AS totB
FROM dual;