MySQL Forums
Forum List  »  Newbie

Re: using Insert Ignore for a specific column only
Posted by: Rich Bernstein
Date: November 09, 2022 08:24AM

I am actually getting an error in mysqlworkbench when I try to add this unqiue index

peration failed: There was an error while applying the SQL script to the database.
ALTER TABLE `substantiator`.`employees`
ADD UNIQUE INDEX `employee_email_campaign_taxyear` () VISIBLE;

ERROR 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 ') VISIBLE' at line 2
SQL Statement:
ALTER TABLE `substantiator`.`employees`
ADD UNIQUE INDEX `employee_email_campaign_taxyear` () VISIBLE

I have tried unchecking visible but I get the same error (almost). Should the TYPE be INDEX and not UNIQUE?

Options: ReplyQuote

Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.