943,822 Members | Top Members by Rank

Ad:
  • MS SQL Discussion Thread
  • Unsolved
  • Views: 817
  • MS SQL RSS
Oct 7th, 2008
0

Codings

Expand Post »
Hello Sir,

Can i plz have query of "Find the 6th highest salary from the table" .....plz send me d query
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
Jahira is offline Offline
17 posts
since May 2008
Oct 11th, 2008
0

Re: Codings

Try this code below:
MS SQL Syntax (Toggle Plain Text)
  1. SELECT top 1 *
  2. FROM (SELECT top 6 *
  3. FROM #tmpSalary
  4. ORDER BY Salary) X
  5. ORDER BY Salary DESC
Reputation Points: 10
Solved Threads: 13
Light Poster
huangzhi is offline Offline
48 posts
since Feb 2008

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in MS SQL Forum Timeline: Query query!
Next Thread in MS SQL Forum Timeline: Split record into 2 records





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC