We've expanded our news coverage and improved our search! Visit news.oreilly.com for the latest or search for all things across O'Reilly!
advertisement

Subject:   query for nth max
Date:   2007-08-25 02:05:46
From:   kashif094
Response to: how do we find nth highest in SQL

select * from emp e where 1=(select count(distinct sal) from emp where e.sal<=sal)



hi i am kashif can anyone tell me what is the concept of 1 in this query?

Full Threads Oldest First

Showing messages 1 through 1 of 1.

  • query for nth max
    2007-10-25 05:02:21  jolly_cet [Reply | View]

    1 specifies the position..