Write a query to find second highest salary of an employee.
Answer Posted / manoranjan
to select the nth highest salary from emp table
select distinct(a.sal) from emp a where &n=
(select count(distinct(b.sal))from emp b where a.sal<=b.sal);
| Is This Answer Correct ? | 3 Yes | 2 No |
Post New Answer View All Answers
What is sql injection owasp?
How to use distinct and count in sql query? Explain
Where is pl sql used?
What is dml and ddl?
What is a natural join sql?
What is linq to sql?
Can we use update in sql function?
Can we join two tables without common column?
how do you know the version of your mysql server? : Sql dba
What is pl sql package?
What is data modelling in sql?
Describe different types of general function used in sql?
What are the various restrictions imposed on view in terms of dml?
Is sql workbench free?
What is a function in oracle pl sql?