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 / swati pise

select top 1 * from table where dept_no in(10,20) order by
sal desc

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

List the ways to get the count of records in a table?

851


Why do we need sharding?

935


why does the selected column have to be in the group by clause or part of an aggregate function? : Sql dba

1040


How can a pl sql block be executed?

888


What is graph sql?

935


How do you optimize a stored procedure in sql?

892


Why do we need view in sql?

931


what are the differences between public, private, protected, static, transient, final and volatile? : Sql dba

974


Does view contain data?

980


Is natural join same as inner join?

869


What is on delete set null?

1034


What do you mean by stored procedures?

950


how can we take a backup of a mysql table and how can we restore it. ? : Sql dba

919


how can we destroy the session, how can we unset the variable of a session? : Sql dba

932


What is a Mapplet?

1057