Resources from

mySQL: on duplicate key update

No Comments

mySQL has a proprietary extension to the “insert” statement which is really handy in certain situations. It’s called ON DUPLICATE KEY UPDATE. If you want to update a table from a similar table, when there are possible duplicates, it updates just the way you’d want. For example. Take a simple table “test” with five records:… (read more)