Erik, try the 'LIMIT' keyword:
SELECT * FROM table LIMIT 20;
This should do what you need. Also, make sure you have an 'ORDER BY' in
there so that you select the actual first 20 (the order of items retrieved
from the DB is not guaranteed to be anything).
--Chris
On Thu, 23 Sep 1999, Erik Andersson wrote:
> I need to select the first 20 posts from a MySQL result. The standard SQL
> syntax supports TOP 20. Is there a way of doing this in MySQL.
> Like:
>
> SELECT * FROM table TOP 20;
>
> / Erik
>
>
>
> ---------------------------------------------------------------------
> Please check "http://www.mysql.com/Manual_chapter/manual_toc.html" before
> posting. To request this thread, e-mail mysql-thread14033@stripped
>
> To unsubscribe, send a message to the address shown in the
> List-Unsubscribe header of this message. If you cannot see it,
> e-mail mysql-unsubscribe@stripped instead.
>