Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


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

Can a view be mutating? If yes, then how?

0 Answers  


Create table emp (id number(9), name varchar2(20),salary number(9,2)); The table has 100 records after table created.Now i nee to change id's Datatype is to be Varchar2(15). now Alter table emp modify(id varchar2(15),name varchar2(20), salary number(9,2)); Whether it will work or returns error? post answer with explanation.

13 Answers   Oracle, TCS,


what is difference between pass by value and eference by value in oracle plsql

1 Answers  


What is the difference between DELETE and TRUNCATE?

15 Answers   Johns Hopkins University, Tech Mahindra,


What is package in pl sql with an examples?

0 Answers  


what eliminate duplicate without using roenum and not

5 Answers   Matrix,


How subquery works in sql?

0 Answers  


what is log shipping? : Sql dba

0 Answers  


.  have a tablle like this: cust acc ----------- a 1 b 2 b 3 c 4 c 5 c 6 I Want below o/p: cust acc --------------- a 1 b 2|3 c 4|5|6 Please any one can you have any ideas share me. I have urgent requirement. CUST         ACC a            dv b            fg b            bh c            mk c            cl c            so result:- A  B   c dv fg mk    bh cl       so

3 Answers  


What are joins in sql?

0 Answers  


How do rank () and dense_rank () differ?

0 Answers  


Why do we use procedures?

0 Answers  


Categories