Women in Technology

Hear us Roar



Article:
  SQL Subqueries
Subject:   nth subquery if the records has same salary for two or three employees
Date:   2006-02-06 04:57:32
From:   onlinestudyguide
sir,
the following is the emp1 table havin
empno| empname| sal|deptno
101 |balu|6000| 101101
102 |subbu|5000|102101
103 |----|4500|103101
104|-----|3500|104101
105|-----|5000|105101
108|----|6000|108101


pls tell me how to write a nth max.salary in this table to find out correctly.
thanks! in advance

Main Topics Oldest First

Showing messages 1 through 2 of 2.

  • nth subquery if the records has same salary for two or three employees
    2006-06-21 01:05:15  JustQuery [View]

    select sal from ( select rownum rn,sal from ( select distinct sal from emp where sal is not null order by sal ) ) where rn = &a
  • nth subquery if the records has same salary for two or three employees
    2006-02-06 12:40:48  subquires [View]