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
How can you control the amount of free space in your index pages?
How do you Implement SSIS Packages in your Project?
Explain a join?
What is a mixed extent?
Can group functions be used in the order by clause in ms sql server?
How do you know if sql server is running on your local system?
How to Update from select query in sql server?
What are scheduled tasks in sql server?
What are difference between Cluster index and Non-Cluster index?
Explain how you can deploy an SSRS report?
How to copy the tables, schema and views from one sql server to another?
What is transact-sql language?
What is TDS(Tabular Data Stream) Gateway?
What is left outer join in sql server joins?
What are entities and relationships?