Skynet

---------- ---------- 我的新 blog : liukaiyi.cublog.cn ---------- ----------

  BlogJava :: 首页 :: 联系 :: 聚合  :: 管理
  112 Posts :: 1 Stories :: 49 Comments :: 0 Trackbacks
引用: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
posted on 2008-10-01 18:13 刘凯毅 阅读(1546) 评论(0)  编辑  收藏 所属分类: database

只有注册用户登录后才能发表评论。


网站导航: