delete from rt where id in
(select id
from rt t
where exists (
select 1
from rt
where typeId=t.typeId
and Name=t.Name
and nId=t.nId
and id<t.id
))
这条语句编译不能通过 提示错误如下:1093-you can't specify target table 'rt' for update in From clause
什么原因 如何修改?
(select id
from rt t
where exists (
select 1
from rt
where typeId=t.typeId
and Name=t.Name
and nId=t.nId
and id<t.id
))
这条语句编译不能通过 提示错误如下:1093-you can't specify target table 'rt' for update in From clause
什么原因 如何修改?
select id
from rt t
where exists (
select 1
from rt
where typeId=t.typeId
and Name=t.Name
and nId=t.nId
and id <t.id
)
) b
where a.id=b.id