Tom,
Tuesday, November 26, 2002, 5:01:08 PM, you wrote:
TP> Is there a simple way in MySQL to only select the first x rows that meet
TP> a specified criteria.
TP> For example in Oracle the following would work:
TP> Select * from Blah where stuff="true" and rownum <= 10
TP> (where rownum is not a specific column, just a count of how many rows
TP> have been returned)
TP> But MySQL doesn't like this.
TP> Anyone know the correct way to approach this??
Use LIMIT clause:
http://www.mysql.com/doc/en/SELECT.html
--
For technical support contracts, goto https://order.mysql.com/?ref=ensita
This email is sponsored by Ensita.net http://www.ensita.net/
__ ___ ___ ____ __
/ |/ /_ __/ __/ __ \/ / Victoria Reznichenko
/ /|_/ / // /\ \/ /_/ / /__ [EMAIL PROTECTED]
/_/ /_/\_, /___/\___\_\___/ MySQL AB / Ensita.net
<___/ www.mysql.com
---------------------------------------------------------------------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php