数据库
首页 > 数据库> > mysql数据库中的出发器

mysql数据库中的出发器

作者:互联网

 

 

 

 

//   Triger_flow_group_user_Insert

BEGIN
	SET new.fid=REPLACE(UUID(),'-','');
	set new.userName=(select ifnull(name,real_name) as name from blade_user where account=new.userNo);
	set new.userId=(SELECT id  FROM blade_user WHERE account=new.userNo);
    END




//   Triger_flow_group_user_Update

BEGIN
	SET new.userName=(SELECT IFNULL(NAME,real_name) AS NAME FROM blade_user WHERE account=new.userNo);
	SET new.userId=(SELECT id  FROM blade_user WHERE account=new.userNo);
    END

  

标签:account,name,数据库,blade,user,mysql,new,出发,userNo
来源: https://www.cnblogs.com/xianz666/p/14771067.html