MySQL Error number: 3109; Symbol: ER_GENERATED_COLUMN_REF_AUTO_INC; SQLSTATE: HY000 报错 故障修复 远程处理

文档解释

Error number: 3109; Symbol: ER_GENERATED_COLUMN_REF_AUTO_INC; SQLSTATE: HY000

Message: Generated column ‘%s’ cannot refer to auto-increment column.

Error 3109 – ER_GENERATED_COLUMN_REF_AUTO_INC

Error Description: This error occurs when referencing an auto-incrementing generated column in the list of expressions of an INSERT or UPDATE statement.

Common Case: It occurs when a user attempts to set the default value of an auto-incrementing generated column in the list of expressions of an INSERT or UPDATE statement.

Resolution: The default value of an auto-incrementing generated column cannot be set in the list of expressions of an INSERT or UPDATE statement. The value must be specified through the DEFAULT clause of the column definition. To avoid this error, make sure to specify the value of an auto-incrementing generated column using the DEFAULT clause of the column definition.


数据运维技术 » MySQL Error number: 3109; Symbol: ER_GENERATED_COLUMN_REF_AUTO_INC; SQLSTATE: HY000 报错 故障修复 远程处理