ONJava.com -- The Independent Source for Enterprise Java
oreilly.comSafari Books Online.Conferences.

advertisement

AddThis Social Bookmark Button
Article:
  SQL Data Types
Subject:   how do we find nth highest in SQL
Date:   2007-11-21 02:20:53
From:   Ani123
Response to: how do we find nth highest in SQL

With qry1 as (Select col1, col2, rownumber() over ()rownum from tablename order by col2 DESC)
select * from qry1 where rownum=6;


This finds the 6th highest;


1 to 1 of 1
1 to 1 of 1