时间:2021-07-01 10:21:17 帮助过:28人阅读
大概要完成的功能就是将这个表(temp)得到的内容分别插入到其它的表,然后将temp表的内容删掉
create trigger insert_trigger
after insert on noticetemp
for each row
begin
insert into notice(NoticeID,NoticeTitle,Editor,Date) select NoticeID,NoticeTitle,Editor,Date from noticetemp;
insert into noticeindex(ClassID,NoticeID) select Class,NoticeID from noticetemp;
insert into noticedetail(NoticeID,NoticeText) select NoticeID,NoticeText from noticetemp;
delete from noticetemp;
end;
结果如图,总是提示错误找不到原因,求大手们指教下子,麻烦了