can anybody tell us, how to select 2nd max salary from
table.
my id is ashish.akk@gmail.com
Answer Posted / rajendra
Select Top 1 * From Tablename where salary in
(select top 2 salary from tablename order by salary desc)
order by salary asc
| Is This Answer Correct ? | 2 Yes | 0 No |
Post New Answer View All Answers
What are transactions and its controls?
What is tabulation?
What is cached report?
What is single-user mode and what are the steps you should follow to start sql server in single-user mode?
Which is better statement or preparedstatement?
How to change the ownership of a schema in ms sql server?
How to find out the list schema name and table name for the database?
Explain primary key and foreign key constraints?
You have developed an application which uses many stored procedures and triggers to update various tables users ocassionally get locking problems which tool is best suited to help you diagnose the problem?
What are data files?
How can you transfer data from a text file to a database table? Or how can you export data from a table to a comma delimited (csv) file? Or how can you import data from ms access to a table in a database? Or how can you export data from a table to an excel file?
How to set database to be single_user in ms sql server?
Difference between connected and disconnected database in .net with sql server?
What are trace flags and mention a few common trace flags used with sql server?
What are the advantages of using a stored procedure?