问题是我为每位员工准备了两行,并希望将它们合并为一行。
尝试运行这些查询但没有成功。你能帮我找出问题吗?使用的所有字段都是非约束。
{
"_id":492464922,
"tags":{
"maxspeed":"20",
"surface":"asphalt",
"highway":"residential",
"oneway":"yes",
"name":"Avenida 1"
},
"loc":{
"type":"Polygon",
"coordinates":[
-83.5047254,
10.0984515,
-83.5052237,
10.0987132,
-83.5056339,
10.0989286
],
"nodes":[
445848963,
4844871065,
432568566
]
}
}
或
UPDATE T1
SET T1.rfid = T2.rfid,
T1.genderid = T2.genderid
from employee T1
LEFT OUTER JOIN employee T2 ON (T1.Code = T2.Code)
显示的错误是: MySQL说:文档
1064 - 您的SQL语法出错;检查与MySQL服务器版本对应的手册,以获得在第3行使用的正确语法
答案 0 :(得分:1)
正确的语法是:
UPDATE TABLE_A a
JOIN TABLE_B b
ON a.join_col = b.join_col
SET a.column = b.column