View Single Post
  #7 (permalink)  
Old 01-17-2007, 12:28 AM
Bga
 
Posts: n/a
Default Oracle answer. Re: i want to get the third highest salary from a table?

Oracle allows to select pseudo-columns with a special meaning.
[sql]
SELECT *
FROM (
SELECT ROWNUM as rank, Emp_id, Emp_salary
FROM employees
ORDER BY Emp_salary
)
WHERE rank=3
;
[/sql]
Edit/Delete Message Reply With Quote