can anybody tell us, how to select 2nd max salary from
table.
my id is ashish.akk@gmail.com
Answer Posted / kavitha.r
This query is generalised query if u replace 2 by 100 ,
then you will get 100th max salary
select top 1 salary from employee where salary in( select
top 2 salary from employee order by salary desc) order by
salary asc
| Is This Answer Correct ? | 1 Yes | 1 No |
Post New Answer View All Answers
Explain log shipping and mention its advantages.
How to execute the cursor queries with "open" statements?
Explain different backup plans?
explain declarative management framework (dmf) in sql server 2008?
how to invoke a trigger on demand? : Sql server database administration
Explain raiserror in sql server?
How to verify the port number of the sql server?
How to enter unicode character string literals in ms sql server?
How to get a list all databases on the sql server?
What is mssql?
What is the name of the Database which IBM mainframe uses?
what is a transaction? : Sql server database administration
Difference between Logical Page and Physical Page in SSRS.
What do you mean by SQL injection attack?
Can you give me some DBCC command options?(Database consistency check) - DBCC CHECKDB - Ensures that tables in the db and the indexes are correctly linked.and DBCC CHECKALLOC - To check that all pages in a db are correctly allocated. DBCC SQLPERF - It gives report on current usage of transaction log in percentage. DBCC CHECKFILEGROUP - Checks all tables file group for any damage.