Beginning MySQL Tutorial One of the fastest SQL (Structured Query Language) database servers currently on the market is the MySQL server, developed by T.c.X. DataKonsultAB. MySQL, available for download at http://www.mysql.com, offers the data base programmer with an array of options and capabilities rarely seen in other database servers. What's more, MySQL is free of charge for those wishing to use it for private and commercial use.
| Name: |
stephen |
| Subject: |
Re: LIMIT statement in MySQL |
| Date: |
07-12-1999 01:41AM |
The LIMIT clause can be used to constrain the number of rows returned by the SELECT statement. LIMIT takes one or two numeric arguments. If two arguments are given, the first specifies the offset of the first row to return, 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
If one argument is given, it indicates the maximum number of rows to return.
mysql> select * from table LIMIT 5; # Retrieve first 5 rows
In other words, LIMIT n is equivalent to LIMIT 0,n.
http://www.mysql.org/Manual_chapter/manual_Reference.html#SELECT
|
Other posts in this thread:
Reply to this post:
|
 |
Visit the MySQL Forum!
New On DevShed:
Hot Forum Topics:
|