Write a query to find second highest salary of an employee.
Answer Posted / versaites
select top 1 emp_total_sal,emp_name from (
select top 2 emp_total_sal,emp_name from employee_table
ORDER BY emp_total_sal DESC) a
ORDER BY emp_total_sal ASC
| Is This Answer Correct ? | 4 Yes | 3 No |
Post New Answer View All Answers
What is a database? Explain
What are the properties of a transaction?
What is the difference between Union and Union all. Which is faster.
What is full join in sql?
what is a database transaction? : Sql dba
What is pragma in sql?
Why do we need a foreign key?
How many parts of a pl sql block are optional?
What version is sql?
what is an extent ? : Sql dba
What is varray in pl sql?
What is t sql in sql server?
What is minus?
Is left join and outer join same?
what is the difference between where clause and having clause? : Sql dba