It may look like a trivial question but I have seen everywhere I have a table: There is no entry for var1 where id = 1 and I want to duplicate the entry for Var1 from the other line to that place I have I tried but failed from: Any advice? Thanks! MySQL has its own ideas for multi-table updates (about syntax for A /) Edit: I've changed the table name to id var1 1 2 9353
id var1 1 9 353 2 9 353
Update table set var1 = (select var1 from table where id = 2) where it came Mr. = 1;
update ). It seems that except the following is necessary, I do not have MySQL to test.
UPDATE t as t1, t as t2 SET t1.var1 = t2.var1 WHERE t1.id = 1 and t2.id = 2;
t ; We do not want a reserved word there.
No comments:
Post a Comment