Posted on 2008-01-24 18:26 
G_G 阅读(297) 
评论(0)  编辑  收藏  所属分类: 
Database 
			
			
		 
		 引用:http://bbs.mysql.cn/thread-9135-1-2.html
 引用:
21. 触发程序delimiter //
create trigger a_bi
before insert on a
for each row Begin
    if new.s2=0 then
      if(new.s3=1) then
        insert into b(s2) values(new.s1);
      elseif(new.s3=2)then
        insert into c(s2) values(new.s1);
      end if;
    end if;
    end;//
delimiter ;