错误 1093 You can't specify target table 'table name' for update in FROM clause
生活随笔
收集整理的這篇文章主要介紹了
错误 1093 You can't specify target table 'table name' for update in FROM clause
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
錯誤提示就是說,不能先select出同一表中的某些值,再update這個表(在同一語句中)
替換方案:
注:把同一個table重新包一遍,重命名
原句:update? person_level_test? set currentStatus=0
where id=(select max(m.id) from? person_level_test)
修改后:update? person_level_test? set currentStatus=0
where id=(select max(m.id) from (select * from person_level_test) m)
轉載于:https://www.cnblogs.com/lteal/archive/2013/05/06/3062709.html
總結
以上是生活随笔為你收集整理的错误 1093 You can't specify target table 'table name' for update in FROM clause的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: zf2 笔记
- 下一篇: 把时间投资在自己的未来