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 temporary table in sql server? Why we use temp table?
Explain what is the purpose of sql profiler in sql server?
How you can change a cross join into an inner join?
How to return the date part only from a sql server datetime datatype?
What is policy based management (pbm)? : sql server database administration
What is ms sql server index?
What is the security principal at the database level that represents your session?
What do you mean by subquery?
What are the new security features added in sql server 2012? : sql server security
How many tables can be joined in SQL Server?
Can we add a cpu to sql server?
How except clause is differs from not in clause?
How to create “dependant” parameter “make, model, year”
What are the restrictions while creating batches in sql server?
Please differentiate between a local and a global temporary table?