早上好
我正在尝试将Sqlserver Join转换为Mysql server Join,任何人都可以帮助我
Sql Server代码
Update @ABC
Set grpId = g.GroupId
From @ABC, luGroup g
Where typeWrd = g.GroupName
and g.GroupTypeId = @gtid
说明:
@Abc -- temporary table
luGroup -- Normal Table
请帮助我将此代码转换为Mysql,谢谢您
谢谢 阿曼迪普(Amandeep)
答案 0 :(得分:1)
粗暴...
Update @ABC
From @workA, luGroup g
Set grpId = g.GroupId
Where typeWrd = g.GroupName
and g.GroupTypeId = @gtid
答案 1 :(得分:1)
更改子句中的更新
Update @workA a
INNER JOIN luGroup g ON a.typeWrd = g.GroupName
AND g.GroupTypeId = @gtid
Set grpId = g.GroupId