Results 1 to 3 of 3

Thread: How to get max of salary from two tables having same data

  1. #1
    Geek_Guest
    Guest

    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.


  2. #2
    Expert Member
    Join Date
    Dec 2006
    Answers
    204

    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.


  3. #3
    Junior Member
    Join Date
    Feb 2007
    Answers
    17

    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
  •  
About us
Applying for a job can be a stressful and frustrating experience, especially for someone who has never done it before. Considering that you are competing for the position with a at least a dozen other applicants, it is imperative that you thoroughly prepare for the job interview, in order to stand a good chance of getting hired. That's where GeekInterview can help.
Interact