我熟悉以下命令的使用方法:
INSERT INTO mytable
SELECT *
FROM other_table
当表格在布局方面相同时,这可以正常工作.
我想做的是:
INSERT INTO mytable
SELECT *
FROM other_table ON DUPLICATE KEY UPDATE
这会因语法错误而失败:
MysqL Error: 1064 – 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 ” at line 1 ON QUERY INSERT INTO mytable SELECT * FROM other_table ON DUPLICATE KEY UPDATE
我找不到任何描述这个的文档.
最佳答案