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

Source: Internet
Author: User

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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.