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 are cursors stored procedures and triggers?
in the physical file layout, where should the transaction log be stored in relation to the data file?
What are the 10 characteristics of data quality?
Does index speed up select statements?
What are the database objects? : SQL Server Architecture
in a table is b in column k (manikanta,sivananda,muralidhar) i want result like (mnikanta,sivnanda,murlidhar) please slove it
What is a trace frag? Where do we use it?
How to get a list of columns using the "sp_help" stored procedure in ms sql server?
How to enter date and time literals in ms sql server?
Do you know what are acid properties?
Can we install sql server 2016 on windows 7?
What is the difference between a check constraint and a rule?
Do you think BCNF is better than 2NF & 3NF? Why?
Do you know what is difference between index seek vs. Index scan?
What is model database in sql server?