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.
Last updated
Was this helpful?
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.
This function is available from MariaDB 13.0.
OLD_VALUE(val)In the RETURNING clause of an UPDATE statement, OLD_VALUE() returns the value before the update. The function is meaningful only in this context.
UPDATE t SET a=a+1 RETURNING OLD_VALUE(a) AS old, a as new;
+------+------+
| old | new |
+------+------+
| 1 | 2 |
+------+------+This page is licensed: GPLv2, originally from fill_help_tables.sql
Last updated
Was this helpful?
Was this helpful?

