我在选课系统中想要在学生表中做个触发器 在添加学生的时候可以自动将他的学号设置为他的登陆密码BEGIN
#Routine body goes here...
declare stupassword int(8)
insert into c_student VALUES(stuid,stuname,stusex,classid);select * from c_student;
END不知道怎么改 刚学存储过程…
#Routine body goes here...
declare stupassword int(8)
insert into c_student VALUES(stuid,stuname,stusex,classid);select * from c_student;
END不知道怎么改 刚学存储过程…
DROP TRIGGER IF EXISTS `tri_update_user`;
DELIMITER ;;
CREATE TRIGGER `tri_update_user` AFTER UPDATE ON `ZF_AYDJ` FOR EACH ROW
begin
INSERT INTO ZF_HISTORY(AYDJ_ID,STATUS,CREATEUSER,CREATETIME) VALUES (NEW.AYDJ_ID,NEW.STATUS,NEW.CREATEUSER,now());
end
;;
DELIMITER ;