How to Remove the 3rd highest salary person record from
table?
Answer Posted / prasanna
DELETE FROM
(SELECT EMP_ID, SALARY, DENSE_RANK() OVER (ORDER BY SALARY
DESC) AS CNT FROM EMPLOYEE)
WHERE CNT = 3;
or
delete from employees where employee_id in (select
employee_id from employees where 2 =(select count(distinct
e.salary) from employees e
where e.salary > employees.salary));
| Is This Answer Correct ? | 3 Yes | 3 No |
Post New Answer View All Answers
Can we write dml statement in function in oracle?
What is a cursor in oracle?
What happens in oracle commit?
How do I use os authentication with weblogic jdriver for oracle and connection pools?
Can I create users through internet explorer in oracle 10g?
How would you change old and new values in an insert, delete and update triggers?
How to join two tables in a single query using oracle?
How to create a table index in oracle?
What are the differences between primary key and unique key?
How to Truncate Table in Oracle
I have a database backup file in .db (ext) form how to conver it into .dmp (ext.) for oracle database
What are the predefined tablespaces in a database?
How do I know if oracle is installed on windows?
What is a cursor variable?
What is Data Dictionary Cache in Oracle?