Select count(*) from multiple tables
Select
case when a.result=0
then 1
else
0
end as Count_of_Table
from
(select COUNT(*) as result
from Table1
full outer join Table2
on Table1.ID=Table2.ID
where Table1.id=3 or Table2.ID=3)AS a
Select
case when a.result=0
then 1
else
0
end as Count_of_Table
from
(select COUNT(*) as result
from Table1
full outer join Table2
on Table1.ID=Table2.ID
where Table1.id=3 or Table2.ID=3)AS a
No comments:
Post a Comment