oracle多表关联删除数据表记录方法

oracle多表关联删除的两种方法

第一种使用exists方法

  1. delete  
  2. from tableA  
  3. where exits  
  4. (  
  5.      select 1  
  6.      from tableB  
  7.      Where tableA.id = tableB.id  
  8. )  

第二种使用匿名表方式进行删除
  1. delete  
  2. from  
  3. (  
  4.       select 1  
  5.       from tableA,TableB  
  6.       where tableA.id = tableB.id  
  7. )  
 
 
原文地址:https://www.cnblogs.com/likeju/p/5009109.html