Oracle中update关联表

xiaoxiao2021-02-28  113

在oracel中修改关联表时,直接上实例:

update  O o set     (o.o1,o.o2,o.o3)=(        select d.d1,d.d2,d.d3 from D d where o.o4=d.d4    )     where exists(           select 1 from D d where o.o4=d.d4 )

这是两个表相关联,用D表中的值修改O表中的对应值

转载请注明原文地址: https://www.6miu.com/read-29672.html

最新回复(0)