Delete the emps whose salaries are lowest sals of their own
dept.
Answers were Sorted based on User's Feedback
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 |
Answer / nagendra
delete from emp where sal in (select min(sal) from emp group
by deptno)
Is This Answer Correct ? | 7 Yes | 7 No |
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 |
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 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 |
what is 'mysqlimport'? : Sql dba
what is check constraint? : Sql dba
What is materialized view in sql?
Is it possible to link two groups inside a cross products after the cross products group has been created?
wht is the difference between truncat,drop in sqlserver wht is the difference between function and stored procedure
What is identity column in sql server?
What is cursor in pl sql?
What is the difference between mdf and ndf files?
Explain the steps needed to create the scheduled job?
What is sql query limit?
what is the difference between delete and truncate commands? : Sql dba
What is rowtype?