errno: 1210 sqlstate: HY000 error: Incorrect arguments to NAME_CONST
The examples were created with the MyWAY SQL manager: Download
How to use the NAME_CONST() function in MySQL and MariaDB databases
In MySQL and MariaDB the NAME_CONST() function is used to create a named constant within a SQL statement and assign a specific value to this constant, which can be referenced multiple times within the SQL statement and thus be made available for calculations or expressions within the statement. This allows the value to be used multiple times in complex queries. By assigning values to named constants, SQL statements can be made more readable and maintainable. Instead of using hard-coded values multiple times in queries, constants can be referenced, which are easier to change when needed.
The NAME_CONST() function is evaluated during query execution and the named constants are only specific to the current SQL statement. They are not accessible outside of the interrogation area.
Further MySQL und MariaDB SQL Miscellaneous functions