VALUES(col_name) : VALUES « Miscellaneous Functions « MySQL Tutorial






VALUES(col_name) in the UPDATE clause refers to the value of col_name that would be inserted.

INSERT INTO table (a,b,c) VALUES (1,2,3),(4,5,6)
ON DUPLICATE KEY UPDATE c=VALUES(a)+VALUES(b);
22.11.VALUES
22.11.1.VALUES(col_name)