[b]Question asked by visitor sunil[/b]
This is Sunil. How to get max of salary from two tables having same data in both the tables.
Printable View
[b]Question asked by visitor sunil[/b]
This is Sunil. How to get max of salary from two tables having same data in both the tables.
select max(salary) from (select * from emp1 union select * from emp2)
try this.
Select MAx(MaxSalary) from (Select Max(Salary) MaxSalary from table A
Union
Select Max(Salary) MaxSalary from table b) as B
Hope this will work