带参触发器简单例子测试

来源:互联网 发布:淘宝网背带裤女装 编辑:程序博客网 时间:2024/06/06 18:22
create table Test
(
iKey int,
iValue int,
primary key(iKey)
);
create table Test_Log
(
iKey int,
iClass varchar(4)
);
create trigger Test_Tri after insert on Test
for each row
begin
   if :new.iValue>90 then
   insert into Test_log values(:new.iKey,1);
   end if;
end;


insert into Test values(12,120);
insert into Test values(18,60);
insert into Test values(10,90);
insert into Test values(20,91);

insert into Test values(21,92);


http://blog.csdn.net/i792439187/article/details/8826751

0 0
原创粉丝点击