引用:http://bbs.mysql.cn/thread-9135-1-2.html
引用:
21. 触发程序
create table a (sa int);
create table b (sb int);
drop trigger a_bi ;
delimiter //
create trigger a_bi
before insert on a
for each row Begin
insert into b values(new.sa*100);
end;//
delimiter ;
insert into a values(1);
select * from b ;> 100
整理 www.blogjava.net/Good-Game