Claudio, Friday, June 14, 2002, 5:34:57 PM, you wrote: CC> Is there a way to obtain max (or min) value in a query? CC> Example: CC> i want to know the last id in mytable table CC> is there a way to do this query? CC> something like CC> select id from mytable where id = max; CC> or something else? CC> The one i wrote i tried it but it does not work.
If the last id in your table is the maximum value per column: SELECT MAX(id) FROM table_name; Look at: http://www.mysql.com/doc/e/x/example-Maximum-column.html CC> Thank you CC> Claudio -- For technical support contracts, goto https://order.mysql.com/?ref=ensita This email is sponsored by Ensita.net http://www.ensita.net/ __ ___ ___ ____ __ / |/ /_ __/ __/ __ \/ / Egor Egorov / /|_/ / // /\ \/ /_/ / /__ [EMAIL PROTECTED] /_/ /_/\_, /___/\___\_\___/ MySQL AB / Ensita.net <___/ www.mysql.com --------------------------------------------------------------------- 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 <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php