CHAR(10) 是定长,VARCHAR(10) 是变长,这是两者最核心的区别。简单说,CHAR(10) 存不满10个字符也会占满10个字符的空间,不足部分用空格补齐;VARCHAR(10) 存多少用多少,只额外加1-2个字节记录实际长度。
我爱模板网新建了个MySQL数据库,往里面插入内容时,报了下面的错误: 1366: Incorrect string value: '我爱模板网' for column 'name' at row 1 插入英文或数字没问题,应该是字符编码问题。打开表
我爱模板网通过phpMyAdmin新建MySql数据表,提交时报错: #1089 - Incorrect prefix key; the used key part isn't a string, the used length is longer than the key part, or the storage engine doesn't support unique prefix keys 截图