最後に生成された行 ( max(id)
row.
このコードを試しましたが、うまくいきません
update person t1
set t1.age = 25
where t1.id = (select max(t2.id) from person t2
where t2.address = 'LA, California');
MySQLは私にそれを教えてくれます:Error Code: 1093. You can't specify target table 't1' for update in FROM clause
なので、更新などの操作を行っているうちに同じ話にたどり着けないのではないかと思います。
どうすればこの問題を解決できますか?
よろしく。