mysql insert else update code example
Example: MySQL update if exists else insert
INSERT INTO tableName(id, NAME, score)
VALUES(1, "Fadl", 285)
ON DUPLICATE KEY
UPDATE NAME = "Fadl", score = 285
INSERT INTO tableName(id, NAME, score)
VALUES(1, "Fadl", 285)
ON DUPLICATE KEY
UPDATE NAME = "Fadl", score = 285