oracle insert 触发器临时数据 保存在 ":new" 中
delete 触发器临时数据保存在 ":old" 中
如:
CREATE OR REPLACE TRIGGER tr_letterReply
AFTER INSERT
ON NET_PETITION_REPLY_SHOW for each row
BEGIN
INSERT INTO letter_reply(
petition_event_uuid,
inner_petition_event_uuid,
reply_show_title,
reply_show_content,
reply_show_time,
show_reply,
show_pro_result
) values
(
:new.petition_event_uuid,
:new.inner_petition_event_uuid,
:new.reply_show_title,
:new.reply_show_content,
:new.reply_show_time,
:new.show_reply,
:new.show_pro_result
);
END tr_letterReply ;
本文介绍Oracle数据库中如何使用触发器来自动插入数据到指定表。通过一个具体示例,展示了如何定义一个after insert触发器,并利用:new来引用新插入的数据行。
1230

被折叠的 条评论
为什么被折叠?



