how to calcuate the second highest salary of he employee

Answer Posted / lalit

select name, sal from (select name,sal from emp where sal<(select max(sal) from emp) order by sal desc)where rownum=1;

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can a table contain multiple primary key’s?

806


what is a stored procedure? : Sql dba

783


how can we repair a mysql table? : Sql dba

705


Is pl sql a programming language?

716


What is full form of rtm?

721






what is collation? : Sql dba

799


how many triggers are allowed in mysql table? : Sql dba

758


What is a scalar value in sql?

804


what are null values? : Sql dba

707


Is null operator in sql?

792


How can you maintain the integrity of your database on instances where deleting an element in a table result in the deletion of the element(s) within another table?

864


How to prepare for oracle pl sql certification?

780


Why do we use subquery?

703


How do I run a script in sql developer?

703


Is ms sql is free?

710