How can I get a single SQL statement to sum two values from a count(*)
I want something like this:
SELECT COUNT(*) FROM MYTABLE
UNION
SELECT COUNT(*) FROM MYOTHERTABLE;
but instead of getting
111
222
I want to see the sum of the two values.
333
can such a thing be done with one statement. I know I can do stuff inside a BEGIN END and have vars but wonder if there is simple single statement solution.
Thanks in advance,
David Miller