请问大家这个触发器有问题吗

小小小小码农 发布于 2013/01/04 09:46
阅读 109
收藏 0

Linux基金会开源软件大学开源技术公开课即将上线,Kubernetes1.19实战讲解!>>>

BEGIN

  select uinfo_company_name into @newName from newqycn_usercenter.qy_userinfo where  uinfo_u_sysid=OLD.uinfo_u_sysid LIMIT 1;

  select u_company_id into @newId from newqycn_usercenter.qy_user where u_sysid=OLD.uinfo_u_sysid LIMIT 1;
 
  select companyid_,companyname_ into @companyId,@companyName from  cc_attributes.ExtUserInfoIndex_ where userid_=OLD.uinfo_u_sysid LIMIT 1;
 
  IF (@companyId <> @newId) or (CONVERT(@companyName USING utf8) <> CONVERT(@newName USING utf8)) THEN
 
  update  cc_attributes.ExtContactsPerMember_ SET ExtContactsPerMember_.companyid_=@newId where userid_=OLD.uinfo_u_sysid LIMIT 1;
 
  update  cc_attributes.ExtContactsUserInfo_ SET ExtContactsUserInfo_.companyid_=@newId,companyname_=@newName where userid_=OLD.uinfo_u_sysid LIMIT 1;
 
  update  cc_attributes.ExtUserInfoIndex_  SET ExtUserInfoIndex_ .companyid_=@newId where userid_=OLD.uinfo_u_sysid LIMIT 1;
 
  END IF;

END

companyname_这个字段插入不进去,麻烦大家帮我看下 谢谢

 

加载中
返回顶部
顶部