同一TABLEを参照しアップデートする。
同一TABLEを参照しアップデートする。
これでアップデートできる事を昨日知りました。
UPDATE demo1,(select chk from demo1 where id=1) as demo2 SET
demo = "2" where id = 1 and chk = demo2.chk;
--------------
--------------
/*
同一TABLEを参照しアップデートする。
table demo1
id,chk
1,123
*/
--------------
タグ
1, 2, and, as, chk, demo, from, ID, select, set, TABLE, UPDATE, where, アップデート, これ, 事, 参照, 同一, 昨日,