创建数据库时出现MySQL错误#1089

时间:2017-07-11 11:23:25

标签: mysql

我正在创建一个数据库,它一直给我错误:

CREATE TABLE `pgdavplacments`.`drive` ( `drive_id` INT(5) NOT NULL AUTO_INCREMENT , 
`drive_name` VARCHAR(200) NOT NULL , 
`drive_date` DATE NOT NULL , 
`drive_time` TIME NOT NULL , 
`drive_info` VARCHAR(8000) NOT NULL , 
`eligibility1` INT(5) NOT NULL , 
`eligibility2` INT(5) NOT NULL , 
`eligibility3` INT(5) NOT NULL , 
PRIMARY KEY (`drive_id`(1000))) 
ENGINE = InnoDB;

这里有什么问题?

1 个答案:

答案 0 :(得分:0)

CREATE TABLE `pgdavplacments`.`drive` (
    `drive_id` INT(5) NOT NULL AUTO_INCREMENT,
    `drive_name` VARCHAR(200) NOT NULL,
    `drive_date` DATE NOT NULL,
    `drive_time` TIME NOT NULL,
    `drive_info` VARCHAR(8000) NOT NULL,
    `eligibility1` INT(5) NOT NULL,
    `eligibility2` INT(5) NOT NULL,
    `eligibility3` INT(5) NOT NULL,
    PRIMARY KEY (`drive_id` )
)  ENGINE=INNODB;

您可以尝试以上查询。