select * from my_GroupUser t1
where exists(select * from my_group t0 where t0.id=14 and t0.id=t1.groupId)delete from my_GroupUser t1
where exists(select * from my_group t0 where t0.id=14 and t0.id=t1.groupId)为什么前面那句sql能执行成功,
而后面那句就错误?区别只是一个select,一个delete,请指点一下
where exists(select * from my_group t0 where t0.id=14 and t0.id=t1.groupId)delete from my_GroupUser t1
where exists(select * from my_group t0 where t0.id=14 and t0.id=t1.groupId)为什么前面那句sql能执行成功,
而后面那句就错误?区别只是一个select,一个delete,请指点一下
比如
为什么
delete from my_groupUser t0 where t0.groupId=1
会有语法错误?delete的时候不能给表指定别名吗?
delete my_GroupUser
from my_GroupUser t1
where exists(select * from my_group t0 where t0.id=14 and t0.id=t1.groupId)
或
delete t1
from my_GroupUser t1
where exists(select * from my_group t0 where t0.id=14 and t0.id=t1.groupId)