Bootstrap

MySQL触发器

delimiter $$
create trigger user_insert_trigger999
after insert on `user`
for each row
begin 
  signal sqlstate '45000' set message_text='singnal 停止设置,到此终止了 return';

insert into user_wallet(user_id,blance)
values(new.user_id,'0.00');

end ;
$$
delimiter;
insert into `user` (username,`password`) values('蛇精1','123456');

 

 

;