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
Explain what are synonyms used for?
How does the on-delete-cascade statement work?
What is a user role in oracle?
Why does oracle 9i treat an empty string as null?
Other than making use of the statspack utility, what would you check when you are monitoring or running a health check on an Oracle 8i or 9i database?
What is where clause in oracle?
What is the Tune Query
When do you get a .pll extension in oracle? Explain its importance
What is oracle in java?
What is a nvl function?
What are operators in oracle?
How to create a table index in oracle?
What are the differences between primary key and unique key?
What is oracle join syntax?
How to list all indexes in your schema?