0

I'm deleting the duplicate rows from MySQL table but somehow the following query doesn't work and showing me

ALTER IGNORE TABLE 'blocking_map' ADD UNIQUE INDEX myindex (block_key, id)

Error Msg:

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 blocking_map ADD UNIQUE INDEX (block_key, id)' at line 1 0.000 sec

fgregg
  • 3,173
  • 30
  • 37
min2bro
  • 554
  • 2
  • 9
  • 19
  • Also, you should use backticks, not single quotes, around table and column names. See https://stackoverflow.com/questions/11321491/when-to-use-single-quotes-double-quotes-and-backticks – Barmar Nov 15 '17 at 20:39
  • 1
    The `IGNORE` option has been removed from `ALTER TABLE` in MySQL 5.7. See the duplicate question for how to do this now. – Barmar Nov 15 '17 at 20:41

0 Answers0