Her er én måde:
select (select count(*) from table1) as t1_amount,
(select count(*) from table2) as t2_amount
Her er en anden måde:
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
Din metode virker ikke, fordi ,
i from
klausul laver en cross join
. Dette gør et kartesisk produkt mellem de to borde.