我使用此查询从同一个表中复制一整列:
UPDATE 'content_type_chapter'
SET 'field_chapternumbersort2_value' = 'field_chapternumbersort_value'
但是我收到了这个错误。
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''content_type_chapter' SET 'field_chapternumbersort2_value'='field_chapternumber' at line 1
可能出了什么问题,我没办法把它弄对。
最佳答案
Single-quotes are for strings .
尝试使用反引号,例如:
UPDATE
`content_type_chapter`
SET
`field_chapternumbersort2_value` = `field_chapternumbersort_value`
不过,反引号并不是绝对必要的。
关于sql - 将表中的一个字段复制到同一个表中的另一个字段,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3754146/