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. )  
 
 

相关文章:

  • 2021-07-21
  • 2022-02-06
  • 2022-12-23
  • 2021-04-24
  • 2021-05-27
  • 2022-12-23
  • 2021-09-26
  • 2021-11-23
猜你喜欢
  • 2021-08-22
  • 2021-06-24
  • 2022-12-23
  • 2021-08-31
  • 2022-12-23
相关资源
相似解决方案