创建 Oracle 触发器器时出现异常:索引中丢失 IN 或 OUT 参数:: 1
<update id="myTrigger"> create trigger "my_trigger" after update on "test" for each row begin insert into "my_temp" ("id", "record_id", "table_name", "type") values (lower(rawtohex(sys_guid())), :old."id", ‘test‘, ‘update‘); end; </update>
经排查是冒号(:old."id")的问题
加上 statementType="STATEMENT" 后就正常了
<update id="myTrigger" statementType="STATEMENT"> create trigger "my_trigger" after update on "test" for each row begin insert into "my_temp" ("id", "record_id", "table_name", "type") values (lower(rawtohex(sys_guid())), :old."id", ‘test‘, ‘update‘); end; </update>