您的位置:首页 > 数据库 > Oracle

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

2015-12-01 09:15 906 查看
oracle多表关联删除的两种方法

第一种使用exists方法

[sql] view plaincopyprint?





delete

from tableA

where exits

(

select 1

from tableB

Where tableA.id = tableB.id

)

第二种使用匿名表方式进行删除

[sql] view plaincopyprint?





delete

from

(

select 1

from tableA,TableB

where tableA.id = tableB.id

)
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: