Oracle 以多个表为条件delete一个表中的数据

来源:互联网 发布:tag在vb中什么意思 编辑:程序博客网 时间:2024/06/08 04:20
这样:
DELETE  TABLE1  where  exists  (  select  1  from  table2  where  and table1.khid=table2.khid and  FWDWID=8);

DELETE TABLE1 where KHID in ( select KHID from table2 where  FWDWID=8)
不可以这样:
DELETE TABLE1.*
FROM TABLE1,TABLE2 where TABLE1.KHID = TABLE2.KHID and TABLE2.FWDWID=8
0 0
原创粉丝点击