from the table display the 2nd highest salary?
and also the least 2nd salay?
Answer Posted / narayana
select top 1 sal from (
select top 2 sal from Emp order by sal desc) as a order by sal asc
select top 1 sal from(
select top 2 sal from Emp order by sal ) ss order by sal desc
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
my name is sejal I have cleared the sbi clerk exam. I am BCA graduate My favorite subject RDBMS Relational database management system. so please send me rRDBMS related interview questions
What is rank function?
Explain unique key in sql server?
What are the restrictions that views have to follow? : SQL Server Architecture
Create a dts package to produce a text file using the ‘update statistics’ command for the tables in a database with obsolete statistics.
What is a partitioned view?
Can we update data in a view?
Can you explain different types of locks in sql server?
Can binary strings be converted into numeric or float data types?
How to modify an existing user defined function?
What is the difference between set and select?
after migrating the dts packg to ssis by using migrtn wizrd in 2005. iam not able to open ssis pack and getting error. what r those errors? how to resolve?
What is the minimum recommended amount of ram for sql server 2012 enterprise?
If you want to send some data from access database to sql server database. What are different component of ssis will you use?
List the different index configurations possible for a table?