Delete the emps whose salaries are lowest sals of their own
dept.

Answers were Sorted based on User's Feedback



Delete the emps whose salaries are lowest sals of their own dept...

Answer / raji_4u

DELETE FROM EMP E1
WHERE E1.SAL =
(SELECT MIN(SAL) FROM EMP E2
WHERE E1.DEPTNO = E2.DEPTNO
)

Is This Answer Correct ?    15 Yes 3 No

Delete the emps whose salaries are lowest sals of their own dept...

Answer / nagendra

delete from emp where sal in (select min(sal) from emp group
by deptno)

Is This Answer Correct ?    7 Yes 7 No

Delete the emps whose salaries are lowest sals of their own dept...

Answer / venkyhulk1

delete from emp where eno in
(SELECT
eno
FROM
(select eno, rank() over ( partition by dno order by
salary) rank , salary from emp) e
WHERE
e.rank=1)


vgupalli@gmail.com

Is This Answer Correct ?    1 Yes 1 No

Delete the emps whose salaries are lowest sals of their own dept...

Answer / divya chaudhry

delete from emp where (depno,nvl2(sal,sal,0)) in ( select
depno,min(nvl2(sal,sal,0)) from emp group by depno )

Is This Answer Correct ?    0 Yes 3 No

Delete the emps whose salaries are lowest sals of their own dept...

Answer / roopesh kumar

delete from emp where (deptno,nvl(comm,0)) in (select
deptno,min(nvl(comm,0)) from emp
group by deptno)

Is This Answer Correct ?    0 Yes 4 No

Post New Answer

More SQL PLSQL Interview Questions

what is 'mysqlimport'? : Sql dba

0 Answers  


what is check constraint? : Sql dba

1 Answers  


What is materialized view in sql?

0 Answers  


Is it possible to link two groups inside a cross products after the cross products group has been created?

0 Answers  


wht is the difference between truncat,drop in sqlserver wht is the difference between function and stored procedure

3 Answers   Apollo,






What is identity column in sql server?

0 Answers  


What is cursor in pl sql?

0 Answers  


What is the difference between mdf and ndf files?

0 Answers  


Explain the steps needed to create the scheduled job?

0 Answers  


What is sql query limit?

0 Answers  


what is the difference between delete and truncate commands? : Sql dba

0 Answers  


What is rowtype?

0 Answers  


Categories