标签:
MERGE INTO INFO_ENTERPRISE A USING(SELECT :enterprise_id ENTERPRISE_ID FROM DUAL) B
ON (A.ENTERPRISE_ID = B.ENTERPRISE_ID) WHEN MATCHED THEN
//更改
UPDATE SET ENTERPRISE_NAME=:enterprise_name
,ENTERPRISE_NS =:enterprise_ns
,TYPE_CODE =:type_code
,SCALE_CODE =:scale_code
,ENTERPRISE_DESC =:enterprise_desc
WHERE ENTERPRISE_ID = :enterprise_id
WHEN NOT MATCHED THEN
//添加
INSERT (
ENTERPRISE_ID
,ENTERPRISE_NAME)
VALUES (
:enterprise_id
,:enterprise_name)
标签:
原文地址:http://www.cnblogs.com/kele-ting/p/4543886.html