how to get second highest salary in SQL(as/4000
Answer Posted / shasi
select sal from emp a where &n=(select count(sal) from emp
b where a.sal>=b.sal)
First u enter 1 means 1st highest sal.then enter2 2nd
highest sal
| Is This Answer Correct ? | 1 Yes | 3 No |
Post New Answer View All Answers
What are tables and fields in the database?
What is the usage of nvl function?
What is left join in sql?
What is the difference between view and stored procedure?
how to drop an existing view in mysql? : Sql dba
What do you mean by “trigger” in sql?
How to select all records from the table?
How do I run a sql query?
What is the difference between cross join and natural join?
What is auto increment?
How to set up sql*plus output format in oracle?
How can we implement rollback or commit statement in a trigger?
what are the advantages a stored procedure? : Sql dba
What is string join?
Can dml statements be used in pl/sql?