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...

two tables are there.1st table EMP has two columns ID and name and contains data 1,A
2,B
3,C
2nd table EmpSal has 2 columns ID and Salary
Contains data -1,1000
2,5000
3,3000

Find name of employee having maximum salary ?

Answer Posted / ganesh

with cte as
(
select *,row_number() over(order by salary desc) as rowno
from empsal
)
select * from emp e join cte c
on e.id=c.id
where c.rowno=1

Is This Answer Correct ?    2 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can you get second highest salary from the table?

947


What is purpose of normalization?

930


What is acid db?

868


What authentication modes does sql server support?

1071


How to create hyperlink from returned sql query ?

1110


What are the basic features of a trigger in ms sql server?

1170


How to create a view using data from another view?

938


How to create a dynamic cursor with the dynamic option?

1023


What is trigger in salesforce?

960


Should you normalize audio?

923


What is role playing dimension with two examples? : sql server analysis services, ssas

982


What is it unwise to create wide clustered index keys?

990


What is the synonym of join?

939


What does the on update no action do?

1002


How would you add a section to a table?

1012