Hello,
In my application I would like to update a MySQL record where one
column
is the largest value. Do I have to create a separate SELECT sql query
statement
to get that value and then update it? Or, is there a function that
allows me to specify it as part of my WHERE clause. I scanned the
manual and found reference to MAX, which appears to do it and can't get
it working.
The syntax I've tried...
UPDATE PICKING SET COL_1 =3D 'My_VAL' WHERE COL_2=3D'My_VAL2' AND
MAX(AUDIT);
and..
UPDATE PICKING SET COL_1 =3D 'My_VAL' WHERE COL_2=3D'My_VAL2' AND AUDIT
=
=3D
MAX(AUDIT);
Does MAX only worke for SELECTS?
Thanks for any help to this obvious newbie question! --Aaron
---------------------------------------------------------------------
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