このページの翻訳:
- 日本語 (ja)
- English (en)
最近の更新
- 麻雀ルール [チップ・焼鳥について]
- 71 vsftpd [Difference Between PASV Mode and ACTIVE Mode]
- 2024.07.02 Windowsライセンス有効期限 [ライセンスの有効期限を確認方法]
最近の更新
update の時同じテーブルに対するサブクエリからの操作ができない
update hoge set code = 0
where id IN
(select id from hoge as tmp where id = 1 group by id order by id)
;
ERROR 1093 (HY000): You can't specify target table 'hoge' for update in FROM clause
これで上手くいく
update hoge set code = 0
where id IN (
select id from
(select id from hoge where id = 1 group by id order by id) as tmp
)
;