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
How is a full-text index updated?
What purpose does the model database server?
What do you mean by sql server 2005 express management tools?
How do I run a trace in sql server?
What is surrogate key? : sql server analysis services, ssas
What are the results of running this script?
Suppose you want to implement the following relationships while designing tables. How would you do it?a.) One-to-oneb.) One-to-manyc.) Many-to-many
What is nolock?
What is the size of transaction log file?
What is the name of the system variable that returns the number of rows affected by a SQL statement?
Do you know how to make remote connection in database?
What is star, snowflake and star flake schema? : sql server analysis services, ssas
What is the difference between the export /import functions in sql studio and standalone sql manager? : sql server management studio
Which tcp/ip port does sql server run on? How can it be changed?
What do you mean by tablesample?