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 the types of queries in sql?
What is sql*loader?
What is the difference between left outer join and left join?
How exception is different from error?
What is ttitle and btitle?
What is rank function in sql?
Can variables be used in sql statements?
How does a trigger work?
Hi am new to PLSQL & facing problems in writing code like in SP, Functions, so any one having some SP coding with in depth explanation please share with me my Email ID suvarnaatsuvarna@rediffmail.com Or taking tanning on this please do contact me
What is the maximum number of columns in sql table?
Why plvtab is considered as the easiest way to access the pl/sql table?
Which language is used in sql?
What are different types of triggers?
Are dml statements autocommit?
How to pronounce postgresql?