Faqts : Business : Programming : Shopping For You : PHP : Database Backed Sites : Oracle

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

23 of 40 people (58%) answered Yes
Recently 8 of 10 people (80%) answered Yes

Entry

How can I limit the number of records to be pulled from a query? In Mysql it's LIMIT X.

Feb 26th, 2001 12:53
Mike Quinn, Moo Nee Choong,


In your Where clause you can have ROWNUM < n

n can be any integer.

e.g.

select *
from sometable
where
ROWNUM < 20

will return the first 19 records in that table.