Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 Transact-SQL (2000)
 Need help with oracle

Author  Topic 

Valentino99
Starting Member

5 Posts

Posted - 2003-05-30 : 05:15:20
Hi all...

How can I do this SQL-Statement in Oracel?

--> SELECT TOP 10 FROM xxx

Oracle don't understand TOP...please helb me.

Thanks all

Robwhittaker
Yak Posting Veteran

85 Posts

Posted - 2003-05-30 : 06:03:59
The easiest way is to use rownum

ie

select * from table
where rownum < 11

will return top 10 rows, however, it doesn't really work all the time if your doing sorts, agregate functions, and on some views, so use it with caution.

Good place to find out oracle syntax is at [url]http://otn.oracle.com[/url]

On the right hand side under resources, click on documentation and drill down, it's a bit of a pain to navigate, but has everything you want.



Go to Top of Page
   

- Advertisement -