At 7:20 PM -0800 3/28/99, <lorin@stripped> wrote:
>I have a database with a column defined as:
>NOT NULL AUTO_INCREMENT
>Is there a simple SELECT statement to grab the 5 largest entries?
>
>thanks
>-Lkb
>
>
>---------------------------------------------------------------------
>Please check "http://www.mysql.com/Manual_chapter/manual_toc.html" before
...............^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Most specifically, see the LIMIT clause in
http://www.mysql.com/Manual_chapter/manual_Reference.html#SELECT
for example,
SELECT * ORDER BY column LIMIT 5
-sbe-
+--------------- my people are the people of the dessert, ---------------+
| Steve Edberg Computer Consultant |
| sbedberg@stripped University of California, Davis |
| (530)753-7605 (530)754-9127 |
+---------------- said t e lawrence, picking up his fork ----------------+