[AccessD] Question

Stuart McLachlan stuart at lexacorp.com.pg
Mon Sep 19 06:00:57 CDT 2005


On 19 Sep 2005 at 11:18, Shamil Salakhetdinov wrote:

> Hi All,
> 
> Here is a query, which selects rows 49,50 from Customers table assuming that
> CustomerID is used for rows ordering:
> 
....
> 
> Does anybody knows/heard/...  do Google and other search engines use similar
> simple queries 

Repeat of my posting to this list on  7 May 2005:

On 6 May 2005 at 10:43, Joe Rojas wrote:

> Hi All,
> 
> How do sites like eBay show only X number of items at a time and allow users  to jump to a page number or click next?
> 
> Is there a SQL statement that allows you to select the 2nd
> (3rd,4th,5th,...)set of X number of records in a database?
> 

If they are using MySQL they will be using the LIMIT command

</quote>
The LIMIT clause can be used to constrain the number of rows returned by 
the SELECT statement. LIMIT takes one or two numeric arguments, which must 
be integer constants. 

With two arguments, the first argument specifies the offset of the first 
row to return, and the second specifies the maximum number of rows to 
return. The offset of the initial row is 0 (not 1): 

mysql> SELECT * FROM table LIMIT 5,10;  # Retrieve rows 6-15
</quote>
-- 
Stuart





More information about the AccessD mailing list