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

select top 2 ename, salary, dept from dbo.employee where
dept in(10,20) order by salary desc

Is This Answer Correct ?    1 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Why is nosql good?

1038


Why is the cursor important?

1051


How to make a copy values from one column to another in sql?

1047


How many triggers can be applied on a table?

944


How do I remove duplicates in two columns?

1082


Why commit is not used in triggers?

1050


What is difference between rank () row_number () and dense_rank () in sql?

1119


What is cross join sql?

926


What are views in sql?

995


what is a cursor? : Sql dba

1035


What is sqlite used for?

1010


how to delete an existing column in a table? : Sql dba

1018


What is blind sql injection?

1082


Why does sql need a server?

1048


Can we create table inside stored procedure?

967