Results 1 to 2 of 2

Thread: how to get second highest value from a table

  1. #1
    lubna Guest

    how to get second highest value from a table

    Using SELECT FROM WHERE how can I get second highest value eg second highest salary in a given salary table.

  2. #2
    zak Guest

    how to get second highest value from a table (reply)

    Try something like that

    Declare @maxsalary int

    Select @maxsalary = max(salary) From tblSalary

    Select max(salary) From tblSalary Where salary <> @maxsalary

    ------------
    lubna at 1/29/2002 2:10:06 AM

    Using SELECT FROM WHERE how can I get second highest value eg second highest salary in a given salary table.

Posting Permissions

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