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 / gautam

select ename,sal from emp
where sal in (select max(sal) from emp group by deptno)
and deptno in (10,20)

Gautam

Is This Answer Correct ?    3 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Is sql better than access?

1021


What are crud methods?

1039


Why we use pl sql?

963


What are the different ddl commands in sql?

1172


How to add new employee details in an employee_details table with the following details

1091


What is error ora-12154: tns:could not resolve the connect identifier specified?

1081


Which is better trigger or stored procedure?

953


What is a field in a database?

1066


what happens when the column is set to auto increment and you reach the maximum value for that table? : Sql dba

1034


What is pivot in sql?

918


Why do we need cursor in pl sql?

1138


how to load data files into tables with 'mysqlimport'? : Sql dba

1095


Which join is like inner join?

1031


How can we optimize a sql query?

1053


Can we use view in stored procedure?

903