| Bug #1545 | ON DUPLICATE KET UPDATE - Not working with INSERT FROM SELECT | ||
|---|---|---|---|
| Submitted: | 13 Oct 2003 20:07 | Modified: | 26 Nov 2005 13:28 |
| Reporter: | [ name withheld ] | Email Updates: | |
| Status: | Closed | Impact on me: | |
| Category: | MySQL Server | Severity: | S4 (Feature request) |
| Version: | 4.10 | OS: | FreeBSD (FreeBSD 4.8) |
| Assigned to: | CPU Architecture: | Any | |
[26 Nov 2005 13:28]
Valeriy Kravchuk
This feature is already implemented. Read the manual (http://dev.mysql.com/doc/refman/4.1/en/insert-select.html) for details.

Description: ERROR 1149: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use How to repeat: mysql> INSERT INTO tw SELECT id, 0, 1, 0, 0 FROM company WHERE addr_physical_city > '' OR addr_postal_city > '' -> ON DUPLICATE KEY UPDATE cat = 1; ERROR 1149: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use Suggested fix: Allow ON DUPLICATE KEY to work with INSERT FROM SELECT...