mysql触发器,
分类:正版必中一肖图计算机

mysql触发器,

1.创建触发器

create trigger trigger_name trigger_time  trigger_event on table_name for each row

begin

trigger_stmt

end

  • trigger_time:before或者是after
  • trigger_event:insert、update和delete
use oa;

--create table trigg select * from students where 1=2;
delimiter //
create trigger cus_trigger before insert on students for each row
begin
insert into trigg values(new.id,new.tname);
end //
delimiter ;

insert into students (tname)values('hehe');

  

2.删除触发器

drop trigger trigger_name;

1.创建触发器 create trigger trigger_name trigger_time trigger_event on table_name for each row begin trigger_stmt end trigger_time:before或者是after trigg...

1.创建触发器

create trigger trigger_name trigger_time  trigger_event on table_name for each row

begin

trigger_stmt

end

  • trigger_time:before或者是after
  • trigger_event:insert、update和delete

    use oa;

    --create table trigg select * from students where 1=2; delimiter // create trigger cus_trigger before insert on students for each row begin insert into trigg values(new.id,new.tname); end // delimiter ;

    insert into students (tname)values('hehe');

  

2.删除触发器

drop trigger trigger_name;

本文由正版必中一肖图发布于正版必中一肖图计算机,转载请注明出处:mysql触发器,

上一篇:ios闭循环援引 下一篇:没有了
猜你喜欢
热门排行
精彩图文