表1:tb_user 字段 strAccountID
表2:tb 字段 accountID我想删除tb_user里面 strAccountID与表2中accountID相同的数据?
delete from TB_USER where straccountID in(select accountID from TB)如果是上面这样做的话 出现提示:无法解决 equal to 操作的排序规则冲突。请问怎么解决?谢谢
表2:tb 字段 accountID我想删除tb_user里面 strAccountID与表2中accountID相同的数据?
delete from TB_USER where straccountID in(select accountID from TB)如果是上面这样做的话 出现提示:无法解决 equal to 操作的排序规则冲突。请问怎么解决?谢谢
create table a(a1 int ,a2 int)
insert into a values(1 , 8 )
insert into a values(2 , 5 )
insert into a values(2 , 5 )
insert into a values(3 , 3 )
insert into a values(3 , 2 )
insert into a values(4 , 9 )
create table b(b1 int ,b2 int)
insert into b values(1 , 8 )
insert into b values(2 , 5 )
insert into b values(2 , 5 ) goselect * from a
select * from b
--删除A表中和B表中(a1=b1)相同的数据
delete A
from
A AA
inner JOIN B BB
on AA.A1 = BB.B1select * from a
select * from b
drop table a
drop table b
a1 a2
----------- -----------
1 8
2 5
2 5
3 3
3 2
4 9(6 件処理されました)b1 b2
----------- -----------
1 8
2 5
2 5(3 件処理されました)
(3 件処理されました)a1 a2
----------- -----------
3 3
3 2
4 9(3 件処理されました)b1 b2
----------- -----------
1 8
2 5
2 5(3 件処理されました)