Friday, March 12, 2010 Register   Login   
   You Are Here: Tips & Tricks » SQL Tip of the Day      

Submit Articles  Upload Scripts   Submit Tips   Start a Blog   Upload Tools   Post Job Openings   Submit Your Resume   About SQL Community

  
Share

 

Thumbnail
To find second highestvalue in the column
Author :: Arjun Patil
Date :: Mon 08/03/2009 @ 12:14

To find the second highets value of the column

so the logic behind this is fist of all we have to make all the values in desc order then select the fron the desc select top2 and from top2 select min value. This will helpful if the col more enough values in it.

 

 


READ MORE ABOUT THIS POST
RATING:   COMMENTS (0)

< PREVIOUS PAGE

  1 of 108  

NEXT PAGE >

Share

     SQL Server Tips Home          SQL Server Articles Home         SQL Server Scripts Home

    
SQL Server  |  SQL Server Forums  |  Articles  |  Scripts/Tools  |  Tips & Tricks  |  Blogs  |  Job Board  |  Videos
Copyright 2007 by www.sqlcommunity.com    Terms Of Use   Privacy Statement