Using the Insert on Duplicate Key Update in MySQL
An interesting statement in MySQL is the INSERT ON DUPLICATE KEY UPDATE. This statement tries to INSERT?a record, and on finding a duplicate key, performs the action provided alongside. Example:
An interesting statement in MySQL is the INSERT ON DUPLICATE KEY UPDATE. This statement tries to INSERT?a record, and on finding a duplicate key, performs the action provided alongside. Example: