0
我想使用觸發器根據條件更新整行。我正在嘗試這種不適用的情況如何使用觸發器基於條件更新整行?
create or replace trigger cust_person_merge_view_t
instead of update on CUST_MDM_PERSON_MERGE
referencing new as new
begin
update mdm_person_tt
set :old.row = :new.row;
where MDM_PARTY_ID =(select mdm_party_id from CUST_MDM_PERSON_MERGE where mdm_entity_id=:old.MDM_ENTITY_ID);
if (sql%rowcount = 0)
then
raise_application_error
(-20001, 'Error updating the CUST_MDM_PERSON_MERGE view !!!');
end if;
end;
你得到什麼錯誤?你的數據庫版本是什麼? CUST_MDM_PERSON_MERGE和mdm_person_tt是否相同?請在您的問題中提供更多相關信息。 – Ollie