MERGE INTO BO_xx B1
USING (SELECT '1' ID, '12' CODE
FROM DUAL) B2
ON (B1.ID = B2.ID AND B1.CODE = B2.CODE)
WHEN MATCHED THEN
UPDATE
SET B1.b1= TO_DATE('2022-12-13', 'yyyy-mm-dd hh24:mi:ss')
WHERE B1.XXX='XXX'
WHEN NOT MATCHED THEN
INSERT INTO TABLE
(DATE)
VALUES
( TO_DATE('2012-12-12', 'yyyy-mm-dd hh24:mi:ss'))
oracle的marge into 语法
最新推荐文章于 2024-07-19 14:24:34 发布