
- Forum
- Databases
- SQL How to get max of salary from two tables having same data
-
How to get max of salary from two tables having same data
Question asked by visitor sunil
This is Sunil. How to get max of salary from two tables having same data in both the tables.
-
Expert Member
Re: How to get max of salary from two tables having same data
select max(salary) from (select * from emp1 union select * from emp2)
try this.
-
Junior Member
Re: How to get max of salary from two tables having same data
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
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules