Syntax
VALUES(col_name)
Notes
The VALUES() function applies only to the INSERT ... ON DUPLICATE KEY UPDATE statement. If you use this function in other statements, it will return NULL.
In the INSERT ... ON DUPLICATE KEY UPDATE statement, you can use the VALUES(col_name) function in the UPDATE clause to reference column values from the INSERT statement.
Examples
obclient> INSERT INTO table (a,b,c) VALUES (1,2,3),(4,5,6) ON DUPLICATE KEY UPDATE c=VALUES(a)+VALUES(b);
Query OK, 2 rows affected (0.01 sec)
Records: 2 Duplicates: 0 Warnings: 0