I am trying to run the query:
ALTER IGNORE TABLE test_table DROP PRIMARY KEY, ADD PRIMARY KEY(id);
test_table is just a temporary table I'm using for testing purposes, and id is a column in it.
The query works fine without the "IGNORE" key word, but when I add it I get the error message:
"Error Code: 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 'IGNORE TABLE test_table ADD PRIMARY KEY(id)' at line 1"
How do I fix this? Or how can I run that query and ignore any errors that might occur? Thanks!
As of MySQL 5.7.4, the IGNORE clause for ALTER TABLE is removed and its use produces an error. Please check your version
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With