Syntax\n------\n\nOLD_VALUE(val)\n\nDescription\n-----------\n\nIn the RETURNING clause of an UPDATE statement, OLD_VALUE() returns the value before the update. The function is meaningful only in this context.\n\nExamples\n--------\n\nUPDATE t SET a=a+1 RETURNING OLD_VALUE(a) AS old, a as new;\n+------+------+\n| old  | new  |\n+------+------+\n|    1 |    2 |\n+------+------+\n\nURL: https://mariadb.com/docs/server/reference/sql-functions/secondary-functions/miscellaneous-functions/old-value