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 / belson gnana pradeep
Select Top 1 salary from (Select TOP 2 salary from tbl_salary order by salary desc)a order by salary
Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
How do I open port 1433?
How to create function with parameter in sql server?
Can we use trigger new in before insert?
What is recursion? Is it possible for a stored procedure to call itself or recursive stored procedure? How many levels of sp nesting are possible?
What are triggers? How do you invoke a trigger on demand?
How many joins in sql server?
What is failover clustering overview?
Mention the 3 ways to get a count of the number of records in a table.
What is the use of commit?
Is sql different from sql server?
What is instead of trigger sql server?
What are sql azure firewall rules?
What is dml command?
What is scan table/view and seek table/view when its occurs? : sql server database administration
What is a trigger? Why we need it?