I Have Employee table having column name as ID,SALARY
how to get second max salary from employee table with id
ex
ID SALARY
1 20000
7 37000
2 5000
Answer Posted / elumalai.k
select id,max(salary)from employee where salary<(select
max(salary)from employee)
| Is This Answer Correct ? | 15 Yes | 6 No |
Post New Answer View All Answers
Explain what stored procedure sp_replcounters is used for? : sql server replication
How do I know if localdb is running?
What are the different types of locks in the database?
How to create percentile function?
Explain how you can configure a running aggregate in SSRS?
What stored by the tempdb ? : sql server database administration
What are subquery and its properties?
How do use Having,Group by,Group function in SQL?
What is abstracting periodical?
How to specify the collation for a character data type in ms sql server?
Define a cross join?
What are the differences between stored procedure and the dynamic sql?
Why normalization is used?
How to list all dsn entries on your local machine using odbc_data_source()?
What is normalization according to you and explain its different levels?