SELECT COUNT(*) FROM table1
SELECT COUNT(*) FROM table2
如何变成一条呢?
SELECT COUNT(*) FROM table1
SELECT COUNT(*) FROM table2
如何变成一条呢?
总共多少条
SELECT COUNT(*) FROM table1 + SELECT COUNT(*) FROM table2
分别查询
(SELECT COUNT(*) FROM table1) union (SELECT COUNT(*) FROM table2)
假设一个是10,一个是20
第一个返回30
第二个返回
10
20