Use mysql replace the

If primarykey or uniquekey already exist will be updated or added.

replace and insert more like writing, the most commonly used writing:

replace into table(field...) values(value...)

Guess you like

Origin www.cnblogs.com/feng07/p/11586550.html