How does MySQL view aliases of constraints?

This is a new feature that specifies the conditions for checking values before inserting or updating rows. If the search condition of any row in the table results in FALSE, the constraint may return an error (but it will not return an error if the result is UNKNOWN or TRUE). This function started running on MySQL 8.0. 16. In previous versions, we could create it, but it didn't work, which meant that grammar was supported, but it didn't work. Rules to remember:

AUTO_INCREMENT is not allowed to add columns by itself.

Reference to another column in another table is not allowed.

Stored functions and user-defined functions are not allowed.

Stored procedures and function parameters are not allowed.

Subqueries are not allowed.

Columns used for ON UPDATE (ON DELETE) are not allowed in foreign keys.

Evaluate the monitoring for the next statements INSERT, UPDATE, REPLACE, LOAD DATA and LOAD XML. In addition, the monitoring constraint will be evaluated for INSERT IGNORE, UPDATE IGNORE, LOAD DATA…IGNORE and LOAD XML…IGNORE. For these statements, a warning will appear if the constraint evaluates to FALSE. Skip insert or update.

We can use this function to add more logic to the table, but according to my previous experience as a programmer, I don't recommend adding logic to the table, because it is difficult to find or debug errors unless you can't access the application code.