首页 > 学院 > 开发设计 > 正文

mysql 创建表失败

2019-11-08 20:38:43
字体:
来源:转载
供稿:网友

MySQL 错误:Row size too large. The maximum row size for the used table type, not counting BLOB

示例:     MySQL的最大行大小限制为65535字节显示在下面的InnoDB和MyISAM的例子。即使存储引擎可以支持较大的行,但无论存储引擎执行的限制是如何执行的。

mysql> CREATE TABLE t (a VARCHAR(10000), b VARCHAR(10000), c VARCHAR(10000), d VARCHAR(10000), e VARCHAR(10000), f VARCHAR(10000), g VARCHAR(6000)) ENGINE=InnoDB CHARACTER SET latin1;ERROR 1118 (42000): Row size too large. The maximum row size for the used table type, not counting BLOBs, is 65535. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs mysql> CREATE TABLE t (a VARCHAR(10000), b VARCHAR(10000), c VARCHAR(10000), d VARCHAR(10000), e VARCHAR(10000), f VARCHAR(10000), g VARCHAR(6000)) ENGINE=MyISAM CHARACTER SET latin1;ERROR 1118 (42000): Row size too large. The maximum row size for the used table type, not counting BLOBs, is 65535. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs mysql> CREATE TABLE t (a VARCHAR(10000), b VARCHAR(10000), c VARCHAR(10000), d VARCHAR(10000), e VARCHAR(10000), f VARCHAR(10000), g TEXT(6000)) ENGINE=MyISAM CHARACTER SET latin1;Query OK, 0 rows affected (0.02 sec)

参考:https://dev.mysql.com/doc/refman/5.7/en/column-count-limit.html


发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表