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


consider a table which contain 4 columns,ename,eno,sal and
deptno, from this table i want to know ename who having
maximum salary in deptno 10 and 20.

Answers were Sorted based on User's Feedback



consider a table which contain 4 columns,ename,eno,sal and deptno, from this table i want to know ..

Answer / sonal

select * from (select ename, deptno,sal
from emp where deptno in(10 , 20)
order by sal desc)
where rownum < =1

Is This Answer Correct ?    2 Yes 4 No

consider a table which contain 4 columns,ename,eno,sal and deptno, from this table i want to know ..

Answer / partha

Select emplid, sal from (select emplid, sal from
emp_sal_tbl where deptid = 10 order by sal desc) a where
rownum < 2
union
Select emplid, sal from (select emplid, sal from
emp_sal_tbl where deptid = 20 order by sal desc) a where
rownum < 2

Is This Answer Correct ?    0 Yes 4 No

consider a table which contain 4 columns,ename,eno,sal and deptno, from this table i want to know ..

Answer / sumesh s.g

select Name from TBL_Employee
where Salary in(
select max(Salary) from dbo.TBL_Employee
group by DepID
having DepID in(10,20))


--Happy Codding--

Is This Answer Correct ?    0 Yes 5 No

consider a table which contain 4 columns,ename,eno,sal and deptno, from this table i want to know ..

Answer / nancy

Select ename from table where dept_no in ('10','20') group
by dpt_no

Is This Answer Correct ?    4 Yes 27 No

Post New Answer

More SQL PLSQL Interview Questions

Which function is used to return remainder in a division operator in sql?

0 Answers  


How many types of indexes are there in sql?

0 Answers  


What is sql scripting?

0 Answers  


What is sql profiler in oracle?

0 Answers  


i have a table like this. i want to output like this c1 c2 c1 c2 1 10 1 10 2 20 2 30 3 30 3 60 4 40 4 100 5 5 5 105 c1 and c2 are columns in a table .i want output like this c2 values are 10,10+20,10+20+30,10+20+30+40.10+20+30+40+5. write a sql query.pls help this i want urgent.

2 Answers   IBM, Loginworks, OFSS,


What is type and rowtype in pl sql?

0 Answers  


Show the cursor attributes of pl/sql.

0 Answers  


how to calcuate the second highest salary of he employee

13 Answers   Synechron,


Is sqlite good enough for production?

0 Answers  


Can we use loop in sql?

0 Answers  


What is coalesce sql?

0 Answers  


What is the use of double ampersand (&&) in sql queries? Give an example

0 Answers  


Categories