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

When a dml statement is executed, in which cursor attributes, the outcome of the statement is saved?

1124


How to run pl sql program in mysql?

1029


What is the difference between view and stored procedure?

964


What is a database trigger?

1078


What are the advantages of normalization?

1082


Which command is used to delete a trigger?

1340


what are the advantages of mysql in comparison to oracle? : Sql dba

1010


What are all the different types of indexes?

1156


Define overloaded procedure?

1089


How to look at the current sql*plus system settings?

1160


what is sp_pkeys? : Transact sql

1166


Define tables and fields in a database

1144


What does subquery mean in sql?

1061


How do I truncate a sql log file?

1080


What is pl sql block in dbms?

1011