I'd like to do an SQL query to get a sum number, but i don't know how to construct this query.
select count(*) from table1 where commom_fk in (1234);
select count(*) from table2 where commom_fk in (1234);
select count(*) from table3 where commom_fk in (1234);
select count(*) from table4 where commom_fk in (1234);
select count(*) from table5 where commom_fk in (1234);
I wanna to sum these results in just one query, is that a way to do this?
Thank you all. -----*
This was answered. But if i wanna to do this with more than one common_fk?