oracle多表关联删除数据表记录方法
2013-06-28 16:31
239 查看
oracle多表关联删除的两种方法
第一种使用exists方法
第二种使用匿名表方式进行删除
这种方法只适合两个表都有主键或外键的时候,若是关联一个管道函数就无法删除成功,会提示错误
第一种使用exists方法
delete from tableA where exits ( select 1 from tableB Where tableA.id = tableB.id )
第二种使用匿名表方式进行删除
delete from ( select 1 from tableA,TableB where tableA.id = tableB.id )
这种方法只适合两个表都有主键或外键的时候,若是关联一个管道函数就无法删除成功,会提示错误
相关文章推荐
- oracle多表关联删除数据表记录方法
- oracle多表关联删除数据表记录方法
- oracle数据中删除数据时提示“记录被另一个用户锁住” 解决方法
- Oracle查询重复数据与删除重复记录方法
- Oracle删除重复记录只保留一条数据的几种方法
- oracle 快速删除大批量数据方法(全部删除,条件删除,删除大量重复记录)
- Oracle删除重复记录只保留一条数据的几种方法
- Oracle查询重复数据与删除重复记录方法
- Oracle查询重复数据与删除重复记录方法
- oracle数据中删除数据时提示“记录被另一个用户锁住” 解决方法: 1、查看数据库锁,诊断锁的来源及类型: select object_id
- Oracle多表关联删除记录的方法
- Oracle查询重复数据与删除重复记录方法
- oracle 快速删除大批量数据方法(全部删除,条件删除,删除大量重复记录)
- oracle 快速删除大批量数据方法(全部删除,条件删除,删除大量重复记录)
- oracle 快速删除大批量数据方法(全部删除,条件删除,删除大量重复记录)
- Oracle查询重复数据与删除重复记录方法
- Oracle查询重复数据与删除重复记录方法
- oracle查询重复数据与删除重复记录方法
- oracle查询重复数据与删除重复记录方法
- oracle 快速删除大批量数据方法(全部删除,条件删除,删除大量重复记录)