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
What is a database in ms sql server?
Explain about link server in sql server?
How do you improve the performance of a SQL Azure Database?
What are the ways available in sql server to execute sql statements?
optimization techinques
Delete duplicate rows without using rowid.
What stored by the master?
What are the tools available in market as an alternative to sql server reporting services?
What is difference between join and natural join?
How to create and drop temp table in sql server?
Why the trigger fires multiple times in single login?
Explain something about security and SQL Azure?
Once setting replication, can you have distributor on sql server 2005, publisher of sql server 2008?
What purpose does the model database server?
How can you ensure that the database and sql server based application perform well?