Loading ...

Find Nth/3rd/2nd highest salary in SQL

Who is online?  0 guests and 0 members
home  »  blogs  »  Vijendra Shakya  »  Find Nth highest salary in SQL

Product Spotlight

ASP.NET Hosting Spotlight

 

Comments (4)

Shaitender

Nice Post !!! Most popular interview question !!! BTW did some one asked u the same ;) Wink

7/15/2011
 · 
 
by
Pravin
Pravin said:
SELECT * FROM [user] user WHERE 3 = (SELECT count(DISTINCT(user1.Salary)) FROM [user] user1 WHERE user.Salary<= user1.Salary) tell me what is use of 3 ? can u explain this query output vise
8/14/2011
 · 
 
by
Umesh
Umesh said:

This Query is very helpful for someone who is new in data base 

8/16/2010
 · 
 
by
Satheesh
Satheesh said:

Thank you for this nice post. really helpful

3/10/2011
 · 
 
by
  • Name:*
  • Email:*
  • Website:
Type the characters you see in the image *

Confirm

Latest community blog posts

  • A person on the forums was struggling with jQuery tools tabs index issue on postback. On clicking the tabs and doing some postback the selected tab index was getting lost. Below is the solution on how to retaing the previous selected index which was there before postback. Complete Source: <%@ Pag...
  • I was working with jQuery tools tabs today and I had to set the initial index of tab selected by default. The solution is to set initialindex property in the options. Source: $("ul.tabs").tabs("div.panes > div", { initialIndex: 1 }) ; Complete code to test above: <html> <head> <tit...
  • A person asked me today how to get form authentication cookie and get the data present in it. I decided to write a short blog on it. Formauthentication cookie is saved with the name which we can get via FormsAuthentication.FormsCookieName property. The key here is to get the cookie via this name and...
  • While working with one of the sample application I noticed that form authentication timeout in web.config was overriding the manual ticket's (which we created via code) timeout. Below is the code which was written in the application: var ticket = new FormsAuthenticationTicket(1, "UserName", DateTime...
  • In this blog I will show how to select a range of characters in textbox with jquery. In my demo I have used one textbox and one button. On click of button arange of characters in textbox will be selected. Below is the sample code: <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="ser...

Vijendra Shakya's latest blog posts

Product Spotlight

ASP.NET Hosting Spotlight

 

Quick Vote

What kind of email newsletter would you prefer to receive from CodeAsp.Net?