mysql中You can't specify target table for update in FROM clause错误

原SQL

delete from DEP_SYSTEM_PORTLET_SETTINGS where ID in (
select ID from
DEP_SYSTEM_PORTLET_SETTINGS
group by (USER_ID) HAVING count(USER_ID) >1
)

修改后

delete from DEP_SYSTEM_PORTLET_SETTINGS where ID in (
select ID from (
select ID from
DEP_SYSTEM_PORTLET_SETTINGS
group by (USER_ID) HAVING count(USER_ID) >1
) C
)
上一篇:学习笔记TF051:生成式对抗网络


下一篇:HDU1312-Red and Black-DFS