标签:主从表
Delete
from ${gfsSchema}FC_GOVT_FILG_CRRN A
WHERE IN_EFF_YR=9999
AND RULE_TAR_CD =:tariffCode
AND CXR_CD = :carrier
AND exists(
Select 1
from ${gfsSchema}FC_SEG_CRRN B
Where
B.IN_EFF_YR = A.IN_EFF_YR
And B.CXR_CD = A.CXR_CD
And B.RULE_TAR_CD = A.RULE_TAR_CD
And B.RULE_CD = A.RULE_CD
And B.FC_CD = A.FC_CD
And B.SEQ_NO = A.SEQ_NO
And B.SEG_ORD_NO = A.SEG_ORD_NO
And B.LAST_DISC_DT is null
And B.SEG_DISC_DT>B.SEG_EFF_DT
And B.UPD_WORK_UNIT_SG = :wuSg
)
其中FC_GOVT_FILG_CRRN为从表,FC_SEG_CRRN为主表
标签:主从表
原文地址:http://5618698.blog.51cto.com/5608698/1629755