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 top1 id,salary from employee
where
(salary<(select max (salary) As sal from employee As Empp))
orderby salary desc.
Is This Answer Correct ? | 5 Yes | 0 No |
Post New Answer View All Answers
How to create nested stored procedure?
What are different types of raid levels?
What happens if you add a new index to large table?
What are the reporting services components?
What are the five characteristics of good data?
What is subquery? Explain the properties of a subquery?
Explain different types of Normalization.
You want to use bids to deploy a report to a different server than the one you chose in the report wizard. How can you change the server url?
can a database be shrunk with users active? : Sql server administration
What is a result set object returned by odbc_exec()?
Tell me what is a linked server?
Explain the rules for designing files and file groups in sql server?
Does partitioning improve performance sql server?
Explain collation?
How do I start sql server 2016?