How to create a dll in dotnet

To get something you never had, you have to do something you never did-Bimal Patel

Thursday, November 11, 2010

Query to find the nth highest salary

SELECT TOP 1 salary
FROM (
SELECT DISTINCT TOP n salary
FROM employee
ORDER BY salary DESC) a
ORDER BY salary

2 comments:

  1. This query will work in MSSQL.What about other databases.Always try to write ANSI select statements.

    Just try this if you are not able let me know

    I am always here to help you

    ReplyDelete
  2. You can always share your queries here

    ReplyDelete