简体   繁体   English

此mysql语法不正确。 它出什么问题了?

[英]This mysql syntax is not correct. What's wrong with it?

This code doesn't work on mysql: 此代码在mysql上不起作用:

update member
set member.xy = memba.surba
from memba
where member.id =memba.id

The code below0 works: 以下代码0有效:

update member inner join memba on member.id =memba.id
set member.xy = memba.surba

Could you please explain what's wrong with the first code? 您能解释一下第一个代码怎么了吗?

Multiple-table syntax: 多表语法:

UPDATE [LOW_PRIORITY] [IGNORE] table_references
    SET col_name1={expr1|DEFAULT} [, col_name2={expr2|DEFAULT}] ...
    [WHERE where_condition]

It would seem that you have a FROM clause that is not part of the update statement in MySQL. 看来您有一个FROM子句,它不是MySQL中update语句的一部分。

See here: http://dev.mysql.com/doc/refman/5.0/en/update.html 看到这里: http : //dev.mysql.com/doc/refman/5.0/en/update.html

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM