MySQL更新查询不起作用#1064

时间:2012-10-30 13:56:57

标签: mysql sql phpmyadmin sql-update

有人能告诉我这个查询有什么问题吗?

UPDATE
    violetta.navi__stop
SET
    violetta.navi__stop.endHour = VB.endHour
FROM
    violetta.navi__stop AS V
INNER JOIN
    violetta_back.navi__stop AS VB
ON V.code = VB.code

此代码示例适用于我的数据库:

SELECT
V.code, V.endHour
FROM
    violetta.navi__stop AS V
UNIQUE
    violetta_back.navi__stop AS VB
ON V.code = VB.code

1 个答案:

答案 0 :(得分:4)

请改为尝试:

UPDATE
    violetta.navi__stop v
INNER JOIN
    violetta_back.navi__stop AS VB
ON V.code = VB.code
SET
    v.endHour = VB.endHour