mysql insert on dupèlicate
snippet in sql

mysql insert on dupèlicate

user1282

INSERT INTO table_name(c1)
VALUES(c1)
ON DUPLICATE KEY UPDATE c1 = VALUES(c1) + 1;