select-MySQL中触发器的创建问题
程序员文章站
2023-12-25 15:55:27
...
selectmysql
大概要完成的功能就是将这个表(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;
结果如图,总是提示错误找不到原因,求大手们指教下子,麻烦了