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 problem one might face while writing log information to a data-base table in pl/sql?

558


What do you mean by stored procedures? How do we use it?

525


Explain the difference between triggers and constraints?

521


How do I add a database to sql?

582


What's the difference between a primary key and a clustered index?

518






What are all the different normalization?

562


how to use like conditions? : Sql dba

577


What is compound trigger?

560


What is posting?

609


How does postgresql compare to "nosql"?

582


Why do we use sql constraints? Which constraints we can use while creating database in sql?

549


How many types of indexes are there in sql?

537


What is rank dense_rank and partition in sql?

539


Does pl sql work in mysql?

536


what is 'mysqlshow'? : Sql dba

591