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
What is format trigger?
What are the roles of dba?
How to use an explicit cursor without open statements?
Is a rollback possible to any savepoint?
Why does for update in oracle 8 cause an ora-01002 error?
What to do if the binary spfile is wrong for the default instance?
Tab A A B ------ 1 A 2 B 3 C Tab B A B ----- 4 D 5 E 6 F Generate the value into B table from A table. Only table A has the value. Write the SQL query to get B table value.
WHAT IS ecc 6.0
Explain oracle insert into command?
How oracle handles dead locks?
Give syntax for SQL and ORACLE joins.
What are the numeric comparison operations?
How to count duplicated values in a column in oracle?
How to rename an index in oracle?
How to drop a stored function?