当前位置:Gxlcms > 数据库问题 > oracle merge同时包含增、删、改

oracle merge同时包含增、删、改

时间:2021-07-01 10:21:17 帮助过:4人阅读

(D.PROD_STATUS = "OBSOLETE") WHEN NOT MATCHED THEN INSERT (PROD_ID, PROD_LIST_PRICE, PROD_STATUS) VALUES (S.PROD_ID, S.PROD_NEW_PRICE, S.PROD_NEW_STATUS);

Thus when a row is updated in products, Oracle checks the delete condition D.PROD_STATUS = "OBSOLETE", and deletes the row if the condition yields true.

The DELETE operation is not as same as that of a complete DELETE statement. Only the rows from the destination of the MERGE can be deleted. The only rows that are affected by the DELETE are the ones that are updated by this MERGE statement. Thus, although a given row of the destination table meets the delete condition, if it does not join under the ON clause condition, it is not deleted.

 

 

oracle merge同时包含增、删、改

标签:物理   this   des   with   要求   update   acl   while   rac   

人气教程排行