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

How do you find current date and time in oracle?

0 Answers  


diff between DELETE and TRUNCATE?.

14 Answers   HCL, Yalamanchili Software,


Hi Masters, in Oracle Applications 11i, we hace 2 functions using the same form, i need to create 1 personalization, but that code must afect only one function.... how can i do that?

0 Answers  


hi friends i completed b.com 2004.i have 3y accounting exp. in manufacturing company.now i have completed oracle finance.pls suggest me how will get job in oracle.can i get job in oracle.

0 Answers  


Explain the use of tables option in exp command.

0 Answers  






select to_char('10','10') from dual This gives me an error oRA-1481 INVALID NUMBER FORMAT MODEL why? pls help

6 Answers  


What is the difference between SQL, DDL, and DML?

7 Answers   BeBo Technologies, Wipro,


Provide an example of a shell script which logs into SQLPLUS as SYS, determines the current date, changes the date format to include minutes & seconds, issues a drop table command, displays the date again, and finally exits.

0 Answers  


List the various oracle database objects?

0 Answers  


What does `(+)` do in a where clause?

1 Answers  


How to write date and time interval literals in oracle?

0 Answers  


How a database is related to tablespaces?

0 Answers  


Categories
  • Oracle General Interview Questions Oracle General (1789)
  • 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)