一起学习网 一起学习网


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

网络编程 MySQL Error number: 3109; Symbol: ER_GENERATED_COLUMN_REF_AUTO_INC; SQLSTATE: HY000 报错 故障修复 远程处理 10-14

文档解释

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.


编辑:一起学习网

标签:文档,column,ER_GENERATED_COLUMN_REF_AUTO_INCError,increment,auto