我正在尝试运行以下声明:
INSERT INTO table (
as,
ad
,af,
ag,
ah,
aj
)
VALUES (
'a',
'b',
'c',
'd',
'e',
'f'
)
ON DUPLICATE KEY UPDATE (
aj='dv',
ah='ev',
ag='fv'
);
并收到以下错误:
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 '(ag='dv',ah='ev',ah='fv')'
at line 3
有什么建议吗?
THX
答案 0 :(得分:5)
略过()..
INSERT INTO site_domains_meta
(domainname,metatype,pagename,english,indonesian,japanese)
VALUES ('a','b','c','d','e','f')
ON DUPLICATE KEY UPDATE english='dv',indonesian='ev',japanese='fv';