如何解决MySQL:错误1628:表'customer'的注释过长最大值= 60
As stated in the MysqL docs, a comment is limited to 255 characters:http://dev.mysql.com/doc/refman/5.1/en/create-table.html#id3411882. Your comment is 305 characters, and it would seem, from the error message, that your particular MysqL install has a 60 character limit.
解决方法
在服务器中执行SQL脚本
错误:错误1628:表’customer’的注释太长(最大值= 60)
脚本:
CREATE TABLE IF NOT EXISTS `sakila`.`customer` (
`customer_id` SMALLINT(5) UNSIGNED NOT NULL AUTO_INCREMENT,`store_id` TINYINT(3) UNSIGNED NOT NULL,`first_name` VARCHAR(45) NOT NULL,`last_name` VARCHAR(45) NOT NULL,`email` VARCHAR(50) NULL DEFAULT NULL,`address_id` SMALLINT(5) UNSIGNED NOT NULL,`active` TINYINT(1) NOT NULL DEFAULT TRUE,`create_date` DATETIME NOT NULL,`last_update` TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP,PRIMARY KEY (`customer_id`),INDEX `idx_fk_store_id` (`store_id` ASC),INDEX `idx_fk_address_id` (`address_id` ASC),INDEX `idx_last_name` (`last_name` ASC),CONSTRAINT `fk_customer_address`
FOREIGN KEY (`address_id` )
REFERENCES `sakila`.`address` (`address_id` )
ON DELETE RESTRICT
ON UPDATE CASCADE,CONSTRAINT `fk_customer_store`
FOREIGN KEY (`store_id` )
REFERENCES `sakila`.`store` (`store_id` )
ON DELETE RESTRICT
ON UPDATE CASCADE)
ENGINE = InnoDB
DEFAULT CHARACTER SET = utf8
评论 ‘表存储所有客户。拥有指向该客户注册的地址表和商店表的外键。\ n \
n有关客户的基本信息(例如名字和姓氏)存储在表本身中。创建记录的日期和信息的最后更新时间相同。
SQL脚本执行完成:语句:成功3次,失败1次
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。