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

Does normalization improve performance?

0 Answers  


What is use of trigger?

0 Answers  


What is normalisation and its types?

0 Answers  


Does mysql_real_escape_string prevent sql injection?

0 Answers  


First round ------------------- - Procedure - Packages - Views - Virtual tables - Can we use dcl with in function? - Joins and few scenarios - Triggers and its type - Pragma, type and its functionality - How to create db link in oracle - Materialized view - How to find duplicate values from table? - Cursor and its functionality - Write a script to display friday and its date from a entire year. - Exception Handling Second round ------------------------ Gave a scenario like. Need to write a function to perform. When user try to change a password. It must not be last five password and a given password can be combination of characters, symbols, upper and lower case.

0 Answers   Prodapt,


what is the difference between join and union? : Sql dba

0 Answers  


Explain the the update statement in sql?

0 Answers  


Explain two easy sql optimizations.

0 Answers  


What is a sql driver?

0 Answers  


What is the use of function "module procedure" in pl/sql?

0 Answers  


How do I count records in sql?

0 Answers  


What is sql and its types?

0 Answers  


Categories