SV: Max int value of char field? How to find...
| From: | Terje Kristensen | Date: | Mon, 22 Oct 2001 06:51:37 +0000 |
| Subject: | SV: Max int value of char field? How to find... | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-71798@lists.php.net to get a copy of this message | ||
How about select max(floor(field)) from table ?
TK
> -----Opprinnelig melding-----
> Fra: Kraa de Simon [mailto:Simon.de.Kraa@icl.nl]
> Sendt: 22. oktober 2001 08:44
> Til: Php-General (E-mail); MySQL (E-mail)
> Emne: Max int value of char field? How to find...
>
>
> Hello all,
>
> How can I find the highest integer value in a result set like:
>
> 1
> 10
> 11
> 2
> 3
> a
> ab
> abc
>
> I'm looking for the value 11.
>
> The statement 'select max(field) from table' gives me 'abc' so this
> won't
> do.
>
> Any ideas for a SQL statement that will do the trick?
>
> I'm using PHP / MySQL.
>
> Thanks!
>
> Simon.
>
> ---------------------------------------------------------------------
> Before posting, please check:
> http://www.mysql.com/manual.php (the manual)
> http://lists.mysql.com/ (the list archive)
>
> To request this thread, e-mail <mysql-thread88614@lists.mysql.com>
> To unsubscribe, e-mail <mysql-unsubscribe-terje=webon.net@lists.mysql.com>
> Trouble unsubscribing? Try:
> http://lists.mysql.com/php/unsubscribe.php
>