Inserting with a Unique Index
suggest changeUPDATE Customers SET Email = "richard0123@example.com" WHERE id = 1;
This will fail if an unique index is set on the Email column of Customers. However, alternate behavior can be defined for this case:
UPDATE Customers SET Email = "richard0123@example.com" WHERE id = 1 ON DUPLICATE KEY;
Found a mistake? Have a question or improvement idea?
Let me know.
Table Of Contents