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

What is a database in ms sql server?

995


Explain about link server in sql server?

1008


How do you improve the performance of a SQL Azure Database?

135


What are the ways available in sql server to execute sql statements?

1041


optimization techinques

2637


Delete duplicate rows without using rowid.

1493


What stored by the master?

904


What are the tools available in market as an alternative to sql server reporting services?

119


What is difference between join and natural join?

897


How to create and drop temp table in sql server?

1003


Why the trigger fires multiple times in single login?

1155


Explain something about security and SQL Azure?

110


Once setting replication, can you have distributor on sql server 2005, publisher of sql server 2008?

906


What purpose does the model database server?

1055


How can you ensure that the database and sql server based application perform well?

1015