Query to find second and third highest value
SQL query to find second and third highest value in empid column
Replace empid column name with salary to apply the logic on salary column
SELECT * FROM (SELECT ROWNUM row_num, b.* FROM ( SELECT e.* FROM emp e ORDER BY empid DESC) b) WHERE row_num IN (2, 3)Related posts:
- View java class source in oracle database
- Load Java source code in oracle database
- Query to find and remove Oracle database locks
- PL-SQL code to write a file
- PL-SQL code to read a file
- Query to find second and third highest value
- PL-SQL Procedure to send email with attachment
- Query to get the details of the lock in the database
- Query to find Table size