Triggers
宋正真
2023-12-01
Create Or Replace Trigger trigger_grfilescontent_insert
Before INSERT --指定触发时机为删除操作前触发
ON tbl_grfilescontent
FOR EACH ROW --说明创建的是行级触发器
declare
v_c varchar2(200);
begin
case
when (:new.f_file is null) then
select (max(id) + 1) into v_c from tbl_file_menu;
insert into tbl_file_menu (id, HASCONTENT) values (v_c, '1');
:new.f_file := v_c;
end case;
end;