0
Need a SQL query to find 5th highest salary of employee without using rank or top functions
I have a table columns emp I'd,emp salay, Need a SQL to find 5th highest salary of employee without using rank or top functions
1 Respuesta
+ 2
There is a way you can generate rownum (1, 2, 3, ...) on the sorted result set. How you do it depends on which DB engine you are using. Then select from that augmented set (e.g., as a subquery) where rownum=5.