问题描述
- MySQL中的Unknown system variable
-
delimiter $
create trigger insert_trigger
after insert on noticetemp
for each row
begin
set notice.NoticeID = (select NoticeID from noticetemp);
set notice.Titile = (select NoticeTitle from noticetemp);
set notice.Editor = (select Editor from noticetemp);
set notice.NoticeDate = (select NoticeDate from noticetemp);
set noticedetail.NoticeID = (select NoticeID from noticetemp);
set noticedetail.NoticeText = (select NoticeText from noticetemp);
set noticeindex.ClassID = (select Class from noticetemp);
set noticeindex.NoticeID = (select NoticeID from noticetemp);delete from noticetemp;
end$
delimiter ;
运行后提示 Error Code: 1193. Unknown system variable 'NoticeID'
新手求指导
解决方案
notice是什么,是表么?有没有NoticeID
noticetemp里有没有NoticeID
解决方案二:
(select NoticeID from noticetemp);
这个结果不止一条吧。
解决方案三:
NoticeID 未识别啊,你定义了吗。
解决方案四:
未知的系统变量,,,,
时间: 2024-09-14 14:03:58