Limit

seany

Registered User.
Local time
Today, 19:06
Joined
Sep 1, 2003
Messages
53
Can you use the LIMIT function in access?

It limits the number of records out putted by a query.

Cheers
 
No, you can't. Instead, you can use the TOP keyword.

i.e.

SELECT TOP 5
 
One note about the TOP n function: If you base a return on a non-unique field, you may not necessarily return all the data you want. For instance, if you have a field with values of 1,2,2,3,3,3,3,3,4,5,6,7, and request the Top 5 records (sorted in order), you will only return the first two records of the field with a value of 3.

The Top function should only be used on fields of Unique values, otherwise you may run into problems.
 

Users who are viewing this thread

Back
Top Bottom