MySQL, , .
, ignore , , .
.. , , , , .
On the other hand, if there is some kind of decision branch based on whether the change is an update or a new value, I think you will have to go with option 2.
those. If changes to the table are recorded in some other table (for example, table: change_log with columns: id, table, column, old_val, new_val), you cannot just use INSERT IGNORE because you can never determine what values were changed or updated.
source
share