求条删除语句 现在有两张表,一张A表,一张B表。两张表有三个主键名称是一样的,想把B表中INSERT_TIME字段为NULL的数据,在A表中删除,该如何在一句SQL中写? 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 delete afrom ajoin b on a.id = b.id and b.INSERT_TIME is null delete afrom ajoin b on a.id1 = b.id1 and a.id2 = b.id2 and a.id3 = b.id3 and b.INSERT_TIME is null delete A from A inner join B on A.id=B.id and B.INSERT_TIME=null delete from a ,b where a.主键=b.主键 and b.INSERT_TIME is null delete a from a join b on a.主键=b.主键 and b.INSERT_TIME is null delete a from a join b on a.id1 = b.id1 and a.id2 = b.id2 and a.id3 = b.id3 and b.INSERT_TIME is null delete afrom awhere exists (select 1 from b where b.pk1=a.pk1 and b.pk2=a.pk2 and b.pk3=a.pk3 and b.INSERT_TIME is null) 求sql语句,在线等 在多个表上,选择相同的字段建立视图,可以吗? raid1 能否做 ghost?(内详) 不用游标,查树所有父id 关于这个sql语句如何写 求一SQL语句 请教关于Like的用法? 一个嵌套存储过程的写法??请教!!! SQLSERVER2000大数据量更新问题,请高手指教,高效率的方法,谢谢! SQL SERVER2000 继续求解 check约束
from a
join b on a.id = b.id and b.INSERT_TIME is null
from a
join b on a.id1 = b.id1 and a.id2 = b.id2 and a.id3 = b.id3 and b.INSERT_TIME is null
join b on a.id1 = b.id1 and a.id2 = b.id2 and a.id3 = b.id3 and b.INSERT_TIME is null
from a
where exists (select 1 from b
where b.pk1=a.pk1
and b.pk2=a.pk2
and b.pk3=a.pk3
and b.INSERT_TIME is null)