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 are packages in pl sql and also explain its advantages?
What are its different types of dbms?
how would concatenate strings in mysql? : Sql dba
Is sql low level language?
Explain the uses of a database trigger?
what are different types of collation sensitivity? : Sql dba
What are different types of sql commands?
What are the different tcl commands in sql?
how to select unique records from a table? : Sql dba
Explain architecture of sql server notification services?
how to use 'mysql' to run sql statements? : Sql dba
What is clustered index in sql?
What is the use of double ampersand (&&) in sql queries? Give an example
Is sql better than excel?
How many subqueries can be nested in a statement?