Suppose,i have 2 tables viz. test1 and test2
and i want to get both tables records count,then i will write below query as:-
Select Count(1) as Row_Count From( Note:- if table Test1 has 20 rows and Test2 as 10 Rows,then above query will produce 30 as row count.
Select Id,Name,Address from test1
Select Id,Name,Address from test2
) as result