ITPub博客

首页 > 数据库 > Oracle > oracle多表关联删除数据表记录方法

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

Oracle 作者:跟着自己混 时间:2013-12-23 17:18:50 0 删除 编辑

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

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/29378313/viewspace-1064071/ ,如需转载,请注明出处,否则将追究法律责任。

下一篇: 没有了~
请登录后发表评论 登录
全部评论

注册时间:2013-12-16

  • 博文量
    3
  • 访问量
    192888