Results 1 to 2 of 2
  1. #1
    Join Date
    Aug 2004
    Posts
    7

    Unanswered: Second Max Salary

    Hi,

    How do we query Second Maximum salary without using Temp Tables.


    Kots.

  2. #2
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    this is a very, very common homework question, so we cannot answer it directly for you, but we can help you discover the answer for yourself

    you can do this with a subquery -- the second highest salary can be determined using MAX(salary), where the salaries aren't the highest salary
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •