File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JDBC and the fly likes How to get top 3 earners in emp table of SCOTT's schema using SQL Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "How to get top 3 earners in emp table of SCOTT Watch "How to get top 3 earners in emp table of SCOTT New topic
Author

How to get top 3 earners in emp table of SCOTT's schema using SQL

Taqi Hasan
Greenhorn

Joined: Aug 16, 2000
Posts: 24
Hello
can any one tell me
How to get top 3 earners in emp table of SCOTT's schema using SQL.
I would appreciate for your prompt reply.
Regards.
Taqi
SJ Adnams
Ranch Hand

Joined: Sep 28, 2001
Posts: 925
select a.ename from ( select ENAME , sal, rownum rowval from emp order by sal desc) a where rownum < 4;
Taqi Hasan
Greenhorn

Joined: Aug 16, 2000
Posts: 24
Thanks Lee for your kind information.
Regards.
Taqi
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to get top 3 earners in emp table of SCOTT's schema using SQL