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
Explain boyce and codd normal form(bcnf)?
Explain about local stored procedure?
Is sql server a database?
Explain contrast amongst grouped and non-bunched records?
What is the difference between count and distinct count?
Explain indexing and what are the advantages of it?
Does union all remove duplicates?
Explain about integration services of Microsoft SQL server?
What causes index fragmentation?
How to list all user names in a database?
What is the difference between implicit and explicit transaction?
Do you know what are the properties of the relational tables?
What are date and time data types in ms sql server?
What are trace files?
What are the different types of cursor?