Vikram Vaswani <[EMAIL PROTECTED]> wrote:
>
> Is there a way to update the record with maximum value in a table with
> another value?
>
> I am trying this:
>
> mysql> update services set sfee = 1 where sfee = max(sfee);
> Query OK, 0 rows affected (0.06 sec)
> Rows matched: 0 Changed: 0 Warnings: 0
>
If you use 4.1 you can do it with:
UPDATE table_name SET .. WHERE column=(SELECT MAX() ..);
--
For technical support contracts, goto https://order.mysql.com/?ref=ensita
This email is sponsored by Ensita.net http://www.ensita.net/
__ ___ ___ ____ __
/ |/ /_ __/ __/ __ \/ / Victoria Reznichenko
/ /|_/ / // /\ \/ /_/ / /__ [EMAIL PROTECTED]
/_/ /_/\_, /___/\___\_\___/ MySQL AB / Ensita.net
<___/ www.mysql.com
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]