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

How can you control the amount of free space in your index pages?

1101


How do you Implement SSIS Packages in your Project?

1988


Explain a join?

1121


What is a mixed extent?

1079


Can group functions be used in the order by clause in ms sql server?

1067


How do you know if sql server is running on your local system?

1099


How to Update from select query in sql server?

1118


What are scheduled tasks in sql server?

1141


What are difference between Cluster index and Non-Cluster index?

1132


Explain how you can deploy an SSRS report?

156


How to copy the tables, schema and views from one sql server to another?

1105


What is transact-sql language?

1135


What is TDS(Tabular Data Stream) Gateway?

127


What is left outer join in sql server joins?

1108


What are entities and relationships?

1024