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?

Answers were Sorted based on User's Feedback



How to Remove the 3rd highest salary person record from table?..

Answer / suresh babu

delete from employees where employee_id in (select
employee_id from employees where 3 =(select count(distinct
e.salary) from employees e
where e.salary >= employees.salary));

Is This Answer Correct ?    17 Yes 1 No

How to Remove the 3rd highest salary person record from table?..

Answer / khan

DELETE FROM
(SELECT EMP_ID, SALARY, DENSE_RANK() OVER (ORDER BY SALARY DESC) AS CNT FROM EMPLOYEE)
WHERE CNT = 3;

Is This Answer Correct ?    9 Yes 5 No

How to Remove the 3rd highest salary person record from table?..

Answer / 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

How to Remove the 3rd highest salary person record from table?..

Answer / avnish srivastava-test engg fc

select max(salary)from employees
where
salary < (select max(salary)from employees where
salary < (select max(salary) from employees))

Is This Answer Correct ?    10 Yes 11 No

How to Remove the 3rd highest salary person record from table?..

Answer / jainish

select max(salary)from employees
where
salary < (select max(salary)from employees where
salary < (select max(salary) from employees))

Is This Answer Correct ?    4 Yes 5 No

How to Remove the 3rd highest salary person record from table?..

Answer / krishna

delete from emp where sal >(select max(sal) from emp where
sal >(select max(sal) from emp where sal >(select max(sal)
from emp)));

Is This Answer Correct ?    0 Yes 2 No

How to Remove the 3rd highest salary person record from table?..

Answer / manoj

delete from employee where sal = (select sal from (select sal from employee order by sal desc) where rownum = 3);

Is This Answer Correct ?    1 Yes 3 No

How to Remove the 3rd highest salary person record from table?..

Answer / nathan

DELETE FROM emp
WHERE empno = (SELECT empno
FROM (SELECT empno, ROWNUM rn
FROM (SELECT empno
FROM emp
ORDER BY sal DESC))
WHERE rn = 3);

Is This Answer Correct ?    1 Yes 3 No

How to Remove the 3rd highest salary person record from table?..

Answer / basanti

delete from employee where salary(select salary from(select
distinct (salary) from employee where salary is NOT NULL
order by salary desc) where rownum=n);

Is This Answer Correct ?    0 Yes 3 No

Post New Answer

More Oracle General Interview Questions

Please help me how to write a Query to change the primary key constraint from 1 attribute to another attribute in a table

3 Answers  


What do you mean by cdb and pdb in oracle 12c?

0 Answers  


How translate command is different from replace?

0 Answers  


How to define and use table alias names in oracle?

0 Answers  


How are extents allocated to a segment?

0 Answers  


what is the difference between data migration and production migration.

0 Answers  


Youre getting high busy buffer waits - how can you find whats causing it?

1 Answers  


How to use an explicit cursor without open statements?

0 Answers  


Which are the five query types available in oracle?

0 Answers  


How can I combine multiple rows into a comma-delimited list in oracle?

0 Answers  


What is the order of defining local variables and sub procedures/functions?

0 Answers  


How to build data dictionary view an new database?

0 Answers  


Categories
  • Oracle General Interview Questions Oracle General (1809)
  • Oracle DBA (Database Administration) Interview Questions Oracle DBA (Database Administration) (261)
  • Oracle Call Interface (OCI) Interview Questions Oracle Call Interface (OCI) (10)
  • Oracle Architecture Interview Questions Oracle Architecture (90)
  • Oracle Security Interview Questions Oracle Security (38)
  • Oracle Forms Reports Interview Questions Oracle Forms Reports (510)
  • Oracle Data Integrator (ODI) Interview Questions Oracle Data Integrator (ODI) (120)
  • Oracle ETL Interview Questions Oracle ETL (15)
  • Oracle RAC Interview Questions Oracle RAC (93)
  • Oracle D2K Interview Questions Oracle D2K (72)
  • Oracle AllOther Interview Questions Oracle AllOther (241)