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

What is delimiter sql?

539


Which command is used to delete a trigger?

763


What are different functions in sql?

507


Can you select everything, but 1 or 2 fields, without writer's cramp?

492


What are sql functions? Describe in brief different types of sql functions?

480






What is gpt format?

497


what is a view? : Sql dba

628


what are the t string functions available in tsql? : Transact sql

534


Which tcp/ip port does sql server run on? How can it be changed? : Sql dba

486


What are pl sql data types?

545


Is sql easier than java?

518


How to avoid using cursors? What to use instead of cursor and in what cases to do so?

594


how to see the create table statement of an existing table? : Sql dba

518


How do I create an index in word?

537


What is difference between rank () row_number () and dense_rank () in sql?

570