Write a query to find second highest salary of an employee.

Answer Posted / preetir

select min(sal) from (select distinct sal from emp order by
desc where rownum < 2)

Is This Answer Correct ?    0 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

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

593


The select into statement is most often used to create backup copies of tables or for archiving records?

669


What are schema-level triggers?

664


how to fetch common records from two tables? : Sql dba

742


what are the non-standard sql commands supported by 'mysql'? : Sql dba

670






Mention what pl/sql package consists of?

628


How many types of cursors are available in pl/sql?

677


How are sql commands classified?

684


Does inner join remove duplicates?

623


How to know the last executed procedure?

694


What is the difference between instead of trigger and after trigger?

613


how to get help information from the server? : Sql dba

597


Is not null in sql?

650


What is a constraint? Tell me about its various levels.

741


How do you update a table in sql?

598