OLD_VALUE
Access values in ON DUPLICATE KEY UPDATE. This function retrieves the value that would have been inserted into a column if no key conflict occurred.
Syntax
OLD_VALUE(val)Description
Examples
UPDATE t SET a=a+1 RETURNING OLD_VALUE(a) AS old, a as new;
+------+------+
| old | new |
+------+------+
| 1 | 2 |
+------+------+Last updated
Was this helpful?

