update item if id exists mysql code example
Example: update item if id exists mysql
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