List:General Discussion« Previous MessageNext Message »
From:Steve Edberg Date:March 29 1999 10:28am
Subject:Re: select largest
View as plain text  
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 ----------------+
Thread
select largestlorin29 Mar
  • RE: select largestStefan Paletta29 Mar
    • Re: Help! Deciding on Java/C++ ?Joel Rees8 May
  • Re: select largestjkraai29 Mar
    • Re: Help! Deciding on Java/C++ ?Gelu7 May
    • Re: Help! Deciding on Java/C++ ?Mark Matthews7 May
    • Encrypted Way to connect to MysqlMarcel7 May
      • Re: Encrypted Way to connect to MysqlIgor Brynskich7 May
      • RE: Encrypted Way to connect to MysqlCal Evans8 May
  • Re: select largestSteve Edberg29 Mar
  • Re: Help! Deciding on Java/C++ ?Gelu7 May
  • Re: Help! Deciding on Java/C++ ?Mark Matthews7 May
  • Re: Help! Deciding on Java/C++ ?Gabriele Bartolini7 May
Re: select largestSteve Edberg29 Mar
RE: Help! Deciding on Java/C++ ?Paul Le7 May
Re: Help! Deciding on Java/C++ ?rup@bigpond.net.au8 May
Re: Help! Deciding on Java/C++ ?Gelu8 May
Re: Help! Deciding on Java/C++ ?Alec.Cawley8 May
Re: Help! Deciding on Java/C++ ?Mark Matthews8 May
Re: INDEXing on MERGED TABLESCharlie Thunderberg8 May
  • RE: INDEXing on MERGED TABLESJay Blanchard8 May
Re: Help! Deciding on Java/C++ ?Gelu8 May
Re: Help! Deciding on Java/C++ ?Frank Morton8 May