how to find the second highest salary from emp table?

Answer Posted / hemanth kumar

select salary from employees where rowid=(select rowid from
employees where rownum<=2
minus
select rowid from employees where rownum<2)
order by salary

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 difference between inner join and self join?

595


Is microsoft sql free?

604


What are % type and % rowtype?

578


What is bitemporal narrowing?

739


What are different functions in sql?

519






How do you add a column to a table?

605


Can we use pl sql in sql server?

542


What are transaction and its controls?

564


How can you tell the difference between an index and a view?

495


what is bcp? When does it used? : Sql dba

526


What is the difference between a query and a report?

524


Which normal form is best?

517


What is use of term?

626


What are local and global Indexes and where they are useful.

931


what is the difference between truncate and delete statement? : Transact sql

552