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 are the sql commands?

0 Answers  


if a string is there like s1,s2,s3,s4.How to find count of commas in this.

4 Answers  


how would concatenate strings in mysql? : Sql dba

0 Answers  


What are the advantages and disadvantages, compared to the standard SQL and SQL*plus ?

2 Answers  


What is plpgsql language?

0 Answers  






Define commit?

0 Answers  


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...

3 Answers  


How do I install microsoft sql?

0 Answers  


How do you declare a constant?

0 Answers  


How many sectors are in a partition?

0 Answers  


What are the sql versions?

0 Answers  


Can we connect to postgresql using sql developer?

0 Answers  


Categories