Warning
Error Code:
3963
MySQL Error 3963: VALUES() Function Deprecated & Null
Description
This warning indicates that the `VALUES()` function, used to access values from the `INSERT` statement's `VALUES` clause, is deprecated. In the current context, it will always return `NULL` instead of the intended value. This behavior change often occurs within `ON DUPLICATE KEY UPDATE` clauses, prompting a shift to using aliases for proper value retrieval.
Error Message
The VALUES function is deprecated and will be removed in a future release. It always returns NULL in this context. If you meant to access a value from the VALUES clause of the INSERT statement, consider using an alias (INSERT INTO ... VALUES (...) AS alias) and reference alias.col instead of VALUES(col) in the ON DUPLICATE KEY UPDATE clause.
Known Causes
3 known causesUsing Deprecated VALUES() Function
The `VALUES()` function is no longer supported for retrieving values from the `INSERT` clause in certain contexts, particularly within `ON DUPLICATE KEY UPDATE` statements.
Incorrect ON DUPLICATE KEY UPDATE Syntax
Attempting to use `VALUES(column_name)` in an `ON DUPLICATE KEY UPDATE` clause, expecting it to return the new row's value, now results in `NULL`.
Legacy Code Migration
Running older SQL scripts or applications that relied on the pre-deprecation behavior of the `VALUES()` function on a newer MySQL server version.
Solutions
Coming SoonGeneral Troubleshooting Tips
- Check the error message carefully for specific details
- Review recent changes that might have caused the error
- Search for the exact error code in the official documentation
- Check log files for additional context
- Try restarting the application or service