在 oracle 的触发器,如果要操作自已,则会报错,可以使用以下方法处理:
create or replace trigger trg_gismapaddress_showname
before update on gismapaddress
for each row
declare
pragma autonomous_transaction;
begin
select t.name || :new.name
into :new.showname
from gismapaddress t
where t.id = :new.parentid;
commit;
end trg_gismapaddress_showname;
create or replace trigger trg_gismapaddress_showname
before update on gismapaddress
for each row
declare
pragma autonomous_transaction;
begin
select t.name || :new.name
into :new.showname
from gismapaddress t
where t.id = :new.parentid;
commit;
end trg_gismapaddress_showname;