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
please explain.. DB architecture ...
I have some query regarding Report generation from Oracle Apps "PO module". I have to generate a report where table columns are as below: Vendor_name Invoice No PO Number Item_Quantity Value of Goods Date of Shipping Name_of_the_transport Date_of_receipt_issued. Now my questions is :from which table/column I can get the information of "Name_of_the_transport" column. Thanks in advance.
what is insert all statement in sql
15. Display the item_cost and then truncate it to the nearest hundred, ten, unit, tenth and hundredth.
How to initialize variables with default values?
What happens to the indexes if a table is recovered?
What is difference between sid and service name in oracle?
How to define an oracle sub procedure?
Define oracle database
does the query needs a hint to access a materialized view?
Is insert autocommit in oracle?
How to rename an index in oracle?
Assuming today is Monday, how would you use the DBMS_JOB package to schedule the execution of a given procedure owned by SCOTT to start Wednesday at 9AM and to run subsequently every other day at 2AM.
What is a read only transaction in oracle?
List out the components of logical database structure of oracle database.