That however will return the number of rows at the moment when the tables are analyzed, not the actual number of rows.
Not to mention that the number might be inconsistent, since the number of rows of table 1 will be counted at one moment and in table 2 in another
What about
select (select count(*) from employees)+(select count(*) from departments
from dual
That is doing again counting table by table, but the result is aggregated by the outer select
Bookmarks