Error occurred while generating SQL file with power Designer [ERR] 1064-you has an error in your SQL syntax; Check the manual that corresponds t o your MySQL server version for the right syntax to use near ' int not null auto_increment comment ' user ID ',
The solution
The SQL statements are as follows
1drop tableifexists tb_users;2 3 /*==============================================================*/4 /*table:tb_users*/5 /*==============================================================*/6 CREATE TABLE Tb_users7 (8UserID NationalintNotNULLAuto_increment Comment'User ID',9OrgIDintComment'Organization ID',TenUsername varchar ( -) notNULLComment'name', OneAccount varchar ( -) Comment'Account Number', APassword varchar ( -) Comment'Password', -Sex varchar (Ten) Comment'Sex', -Phone varchar ( -) Comment'Telephone', theDuties varchar ( -) Comment'Post Position', -Mail varchar ( -) Comment'Email', -PersonstatusChar default '0'Comment'Status of personnel (0 serving, 1 turnover)', -AccountstatusChar default '0'Comment'account status (0 normal, 1 logoff)', +Enabletime datetime Comment'Account Login Effective Time', -Newaddtime datetime Comment'New Time', +UpdateTime datetime Comment'Update Time', AOperater varchar ( $) Comment'Operating Person', atLastloadtime datetime Comment'Last logon time', -BZ1 varchar ( $) Comment'Remark 1', -bz2 varchar ( $) Comment'Remark 2', -BZ3 varchar ( $) Comment'Remark 3', - primary KEY (userid) - ); in -ALTER TABLE Tb_users Comment'User Table'; to + ALTER TABLE tb_users add constraint fk_reference_11 foreign key (OrgID) -References Tb_organize (OrgID) on the delete restrict on update restrict;
The following error occurred after execution,
[ERR] 1064-you has an error in your SQL syntax; Check the manual-corresponds to your MySQL server version for the right syntax-use-near ' int not null Auto_increme NT comment ' User ID ', orgid int com ' at line 6
Workaround:
If you find that there is more than one national keyword in the SQL statement executed, remove the keyword.
Set in Podwer Designer to remove the front checkmark
MYSQL executes the statement error ERR] 1064-you has an error in your SQL syntax; Check the manual, corresponds to your MySQL server version for the right syntax