Re: getting only the largest or smallest values in a select statement
| From: | Ed Carp | Date: | Mon, 09 Oct 2000 15:54:31 +0000 |
| Subject: | Re: getting only the largest or smallest values in a select statement | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-19204@lists.php.net to get a copy of this message | ||
Ademola Adebayo (ademola_adebayo@hotmail.com) writes:
> try
> select max(amount) from purchases
You can also do "select amount from purchases order by amount limit 1". If you
need more than one row just change the limit.
--
Ed Carp, N7EKG erc@pobox.com 940/367-2744 cell phone
http://www.pobox.com/~erc ercpager@khijol.org - text pager
I sometimes wonder if the American people deserve to be free - they seem
so unwilling to fight to preserve the few freedoms they have left.