oracle两表关联更新
发布时间:2020-12-12 15:53:47 所属栏目:百科 来源:网络整理
导读:带条件进行更新关联: update 表1 set 字段= (select 字段 from 表2 where 表2.user_fullname = 表1.VISITDOCTOR and length(表1.visitdoctorcode) 30 and 表1.VISITDOCTORCODE = VISITDOCTOR and 表2.teamid=表1.Operunitcode) where exists( select 1 from
带条件进行更新关联: update 表1 set 字段= (select 字段 from 表2 where 表2.user_fullname = 表1.VISITDOCTOR and length(表1.visitdoctorcode) < 30 and 表1.VISITDOCTORCODE = VISITDOCTOR and 表2.teamid=表1.Operunitcode) where exists( select 1 from 表2 where 表2.user_fullname = 表1.VISITDOCTOR and length(表1.visitdoctorcode) < 30 and 表1.VISITDOCTORCODE = VISITDOCTOR and 表2.teamid=表1.Operunitcode) (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |