将Sqlserver转换为Mysql服务器

时间:2018-07-23 13:41:44

标签: mysql mysql-workbench

大家好,

我正在将触发器创建到MySql Aurora中,但我想将错误处理到触发器中 例如

Update WorkA
Set grpId= select(g.GroupID)  -- Getting Error in this line
From   WorkA luGroup g 
Where  typeWrd=g.GroupName
AND    g.GroupTypeId= v_gtid;
If RETURNED_SQLSTATE <> 0      -- Getting Error in this line 
Then
Signal  SQLSTATE '02000' SET MESSAGE_TEXT = 50002 11, 1, 'trInluDivision';
End if;


Sql Server code


   Update @workA 
      Set grpId = g.GroupId
     From @workA, luGroup g
    Where typeWrd = g.GroupName  
      and g.GroupTypeId = @gtid 

实际上,我被困住了 请为此提供帮助

谢谢 阿曼

0 个答案:

没有答案