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
Can you get second highest salary from the table?
What is purpose of normalization?
What is acid db?
What authentication modes does sql server support?
How to create hyperlink from returned sql query ?
What are the basic features of a trigger in ms sql server?
How to create a view using data from another view?
How to create a dynamic cursor with the dynamic option?
What is trigger in salesforce?
Should you normalize audio?
What is role playing dimension with two examples? : sql server analysis services, ssas
What is it unwise to create wide clustered index keys?
What is the synonym of join?
What does the on update no action do?
How would you add a section to a table?