Mysql
 sql >> Database >  >> RDS >> Mysql

Come contare le righe da due tabelle in una query?

Usa le sottoquery e se necessario aggiungi FROM DUAL :

SELECT 
    (SELECT COUNT(*) FROM TABLE1) As Table1Count, 
    (SELECT COUNT(*) FROM TABLE2) As Table2Count
[FROM DUAL]