It seems to me that UPDATE is well designed for constants, and functions that do not depend on the database, but when I want to UPDATE based on a table, I run into trouble. See, this is not allowed:
mysql> update address set membersince = (select membersince from address where memberid = 1258) where memberid = 1724;
An intermediat variable is the only way, right? And sometimes I want to change many of a field from another table: I read that subqueries are to be avoided, but in this case I cannot find any means other than correlated subquery to do that. Eh?
-- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/mysql
Nov 28
Johan De Meersman Re: "UPDATE" with variable
Nov 28, 2011; 12:43
Johan De Meersman
Re: "UPDATE" with variable
Search
Lasso Programming
This site manages and broadcasts several email lists pertaining to Lasso Programming and technologies related and used by Lasso developers. Sign up today!