how to get second highest salary in SQL(as/4000

Answer Posted / c srirammulu

select * from emp a where &n=(select count(distinct (sal))
from emp f where a.sal<f.sal)

Is This Answer Correct ?    4 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is sql rowcount?

553


Is left join faster than join?

538


what is the syntax used for partition in tsql? : Transact sql

534


What does select top 1 do in sql?

538


what are the different tables present in mysql, which type of table is generated when we are creating a table in the following syntax: create table employee (eno int(2),ename varchar(10)) ? : Sql dba

611






What is a temporal data type?

593


what are the difference between clustered and a non-clustered index? : Sql dba

524


Enlist the data types that can be used in pl/sql?

570


What is auto increment in sql?

583


What is a nested table in word?

529


What is aggregate function in sql?

529


What makes a good primary key?

519


Why do you partition data?

530


What is the difference between local variables and global variables?

603


When are we going to use truncate and delete?

549