The following SQL statement was encountered when the table was built with the same name as the reserved word for MySQL that caused the table not to be built:
CREATE TABLETbl_account_frozen_record (IDBIGINT not NULLauto_increment,trade_flow_idVARCHAR( -) not NULL, Account_noVARCHAR( +) not NULL, InitiatorVARCHAR( -) not NULL, Operate_typeVARCHAR( +) not NULL, CredentialVARCHAR( $), Modify_dateTIMESTAMP DEFAULT Current_timestamp, Unfrozen_dateTIMESTAMP, REASONVARCHAR( $), DESCRIBEVARCHAR( $), Create_dateTIMESTAMP,CONSTRAINTP_key_1PRIMARY KEY(ID)) ENGINE=InnoDBDEFAULTCHARSET=UTF8;
Where describe is a MySQL reserved word, to create a new table containing the column name, the field needs to be processed, plus the "•" is not a single or double quotation mark, but the top left-hand corner of the keyboard, the one on the left side of the "1" key:
The modified SQL statements are as follows, and the following table is established as normal:
CREATE TABLETbl_account_frozen_record (IDBIGINT not NULLauto_increment,trade_flow_idVARCHAR( -) not NULL, Account_noVARCHAR( +) not NULL, InitiatorVARCHAR( -) not NULL, Operate_typeVARCHAR( +) not NULL, CredentialVARCHAR( $), Modify_dateTIMESTAMP DEFAULT Current_timestamp, Unfrozen_dateTIMESTAMP, REASONVARCHAR( $), ' DESCRIBE 'VARCHAR( $), Create_dateTIMESTAMP,CONSTRAINTP_key_1PRIMARY KEY(ID)) ENGINE=InnoDBDEFAULTCHARSET=UTF8;
MySQL column name and reserved word duplicate problem resolution when you build a table