Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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 Help Members By Posting Answers For Below Questions

Can we write dml statement in function in oracle?

1078


What is a cursor in oracle?

1170


What happens in oracle commit?

1021


How do I use os authentication with weblogic jdriver for oracle and connection pools?

1046


Can I create users through internet explorer in oracle 10g?

1078


How would you change old and new values in an insert, delete and update triggers?

1017


How to join two tables in a single query using oracle?

988


How to create a table index in oracle?

1132


What are the differences between primary key and unique key?

1005


How to Truncate Table in Oracle

1154


I have a database backup file in .db (ext) form how to conver it into .dmp (ext.) for oracle database

2134


What are the predefined tablespaces in a database?

1079


How do I know if oracle is installed on windows?

928


What is a cursor variable?

1122


What is Data Dictionary Cache in Oracle?

1162