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.

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How do I clear the screen in sql plus?

1042


What is the use of count (*) in sql?

1054


What does <> sql mean?

1091


what is rdbms? : Sql dba

1014


How do you declare a user-defined exception?

1025


Can we join 3 tables in sql?

1044


Why are aggregate functions called so?

947


What is sharding in sql?

987


What are the types of optimization?

961


Which type of cursor is used to execute the dml statement?

958


How to process query result in pl/sql?

1128


Explain the order of sql statement execution?

1046


What steps server process has to take to execute an update statement?

976


How do I find duplicates in two columns?

1169


How do you optimize a stored procedure query?

998