我正在尝试将数据插入MySQL并在列重复时更新列。 我的SQL查询是:
INSERT INTO domain_pricing (tld, provider, year_1, year_2, year_3, year_5, year_10,
renew_1, renew_2, renew_3, renew_5, renew_10)
VALUES ("tickets", "namecheap", 29567.2, 59134.4, 88701.6, 147836, 295672,
29567.2, 59134.4, 88701.6, 147836, 295672)
ON DUPLICATE KEY UPDATE
tld='tickets', provider='namecheap', year_1=29567.2, year_3=59134.4,
year_5=88701.6, year_10=147836, renew_1=295672, renew_2=29567.2, renew_3=59134.4,
renew_5=88701.6, renew_10=147836