SQL Row Counting in MySQL

2002-11-26 Thread Tom Place
Hi All, Is there a simple way in MySQL to only select the first x rows that meet a specified criteria. For example in Oracle the following would work: Select * from Blah where stuff=true and rownum = 10 (where rownum is not a specific column, just a count of how many rows have been returned)

Re: SQL Row Counting in MySQL

2002-11-26 Thread Pae Choi
There is SQL function called COUNT. Check it out and see of that helps you. Pae Hi All, Is there a simple way in MySQL to only select the first x rows that meet a specified criteria. For example in Oracle the following would work: Select * from Blah where stuff=true and rownum = 10

Re: SQL Row Counting in MySQL

2002-11-26 Thread Joakim Andersson
Tom Place wrote: Hi All, Is there a simple way in MySQL to only select the first x rows that meet a specified criteria. For example in Oracle the following would work: Select * from Blah where stuff=true and rownum = 10 (where rownum is not a specific column, just a count of how many rows have

Re: SQL Row Counting in MySQL

2002-11-26 Thread Gelu Gogancea
[EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, November 26, 2002 5:01 PM Subject: SQL Row Counting in MySQL Hi All, Is there a simple way in MySQL to only select the first x rows that meet a specified criteria. For example in Oracle the following would work: Select * from Blah where

re: SQL Row Counting in MySQL

2002-11-26 Thread Victoria Reznichenko
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

Re: SQL Row Counting in MySQL

2002-11-26 Thread Alec . Cawley
Is there a simple way in MySQL to only select the first x rows that meet a specified criteria. For example in Oracle the following would work: Select * from Blah where stuff=true and rownum = 10 ? (where rownum is not a specific column, just a count of how many rows have been returned)

Re: SQL Row Counting in MySQL

2002-11-26 Thread Steve Yates
On Tue, 26 Nov 2002 15:01:08 -, Tom Place wrote: a simple way in MySQL to only select the first x rows See LIMIT: http://www.mysql.com/doc/en/SELECT.html - Steve Yates - If at first you don't succeed, then skydiving isn't for you. ~ Taglines by Taglinator - www.srtware.com ~