To find second largest salary in Employee table
Answer Posted / murugesh
select * from (select row_number over( order by salary
desc) as salcount,empid,salary from employee) emp
where emp.salcount = 2
| Is This Answer Correct ? | 1 Yes | 2 No |
Post New Answer View All Answers
What is difference between Datepart() and Datename() in SqlServer?
Where in ms sql server is ’100’ equal to ‘0’?
What do you understand by user-defined function in the sql server and explain the steps to create and execute a user-defined function in the sql server?
What action plan is preferred if sql server is not responding?
What is the difference between the application object and session object?
Define Business Edition in SQL Azure?
Explain what is lock escalation and what is its purpose?
Write a query to include a constraint, to check whether the employee salary is greater than 5000?
How to list all objects in a given schema?
What do you understand by triggers?
What is the use of RDBMS?
How do I start sql server 2016?
How to use "begin ... End" statement structures in ms sql server?
Explain powershell included in sql server 2008?
What is rtm version in sql server?