Write a query to get 2nd maximum salary in an employee table ?
Answer Posted / sandeep
select top(1) a.salary
from
(
select top(2)sal
from
employee
order by salary desc
)a
order by a.salary asc
| Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
What is sql indexing?
What is a database trigger?
What is lexical units in pl sql?
What is int identity in sql?
What does bitemporal mean?
What is sequence in sql?
How can use stored procedures in sql?
What is a pragma statement?
what is the difference between mysql_fetch_object and mysql_fetch_array? : Sql dba
How do you exit in sql?
What is difference between stored procedure and trigger?
Suppose a student column has two columns, name and marks. How to get name and marks of the top three students.
How to change a value of the field ‘salary’ as 7500 for an employee_name ‘john’ in a table employee_details?
What company owns postgresql?
Explain the purpose of %type and %rowtype data types?