How to get Top 10 Salaries from a Table

Answer Posted / bharath

In Oracle,
select e1.* from emp e1
where &n>(select distinct(COUNT(*)) from emp e2
where e1.sal>e2.sal)order by sal;


Place where n=10
we get,

Is This Answer Correct ?    2 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is explain in db2?

585


what is a corelated subquerry?

658


How to test SQL -911 error while developing COB-DB2 program

6715


Can you use max on a char column?

638


What is nvl in db2?

627






Mention the way of highlighting as well as putting a cursor to use in a cobol program.

628


Is the primary key a clustered index?

611


How can you count the number of rows from a table tab?

637


How to view db2 table structure?

593


What is dbrm in db2 database?

591


What is a db2 cursor?

626


How many databases can be created inside an instance in db2 ?

601


Can there be more than one cursor open for any program?

659


can any one provide me the link for the db2 v7 & db2 v8 manual for Z/os? i need to know about the syntax of REORG in both versions & need to know the difference as well

1806


How to create backup table in db2?

644