Ini salah satu caranya:
select (select count(*) from table1) as t1_amount,
(select count(*) from table2) as t2_amount
Ini cara lain:
select t1.t1_amount, t2.t2_amount
from (select count(*) as t1_amount from table1) t1 cross join
(select count(*) as t2_amount from table2) t2
Metode Anda tidak berfungsi karena ,
di from
klausa melakukan cross join
. Ini menghasilkan produk kartesius antara dua tabel.