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 are the sql commands?
if a string is there like s1,s2,s3,s4.How to find count of commas in this.
how would concatenate strings in mysql? : Sql dba
What are the advantages and disadvantages, compared to the standard SQL and SQL*plus ?
What is plpgsql language?
Define commit?
I am creating an index on Emp table Empno column,if u using this indexed column in ur SELECT stmt. where clause,then how do u know that yr index will be working or nor? Thanks Advance...
How do I install microsoft sql?
How do you declare a constant?
How many sectors are in a partition?
What are the sql versions?
Can we connect to postgresql using sql developer?