【发布时间】:2016-10-02 06:56:20
【问题描述】:
从我的角度来看,这个查询应该可以工作
UPDATE tab_antiguedad set rol_id = 4
where ant_id = 29
and rol_id not in (
select rol_id
from tab_antiguedad
where usu_id = 55
)
Where (select rol_id from tab_antiguedad where usu_id = 55) 这里rol_id 有 4 和 3。
但我犯的错误是:
您不能在 FROM 中指定目标表 'tab_antiguedad' 进行更新 子句
请帮忙。
【问题讨论】:
标签: mysql sql-update where-clause