2017-06-29 58 views
1

谁能告诉我什么是错在下面的语法?它自动生成一个从MySQL工作台,所以我怀疑有什么不对的语法MYSQL自动生成的查询语法错误

ERROR 1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NOT NULL, 
    PRIMARY KEY (`postcommit_si_flags_id`), 
    UNIQUE INDEX `software_ima' at line 5 
SQL Statement: 
CREATE TABLE `aci_dev`.`postcommit_si_flags` (
    `postcommit_si_flags_id` INT NOT NULL AUTO_INCREMENT, 
    `software_image_id` INT UNIQUE NOT NULL, 
    `bypass_testcase_failure` TINYINT NOT NULL, 
    `base_meta` NOT NULL, 
    PRIMARY KEY (`postcommit_si_flags_id`), 
    UNIQUE INDEX `software_image_id_UNIQUE` (`software_image_id` ASC), 
    CONSTRAINT `software_image_id` 
    FOREIGN KEY (`software_image_id`) 
    REFERENCES `aci_dev`.`software_images` (`software_image_id`) 
    ON DELETE NO ACTION 
    ON UPDATE NO ACTION) 

回答

1

Base_meta没有键入

`base_meta` NOT NULL, 

应该如:

`base_meta` int NOT NULL,