好久没自己动手创建表格了,今天创建的时候发现有2个提醒
原始SQL:
CREATE TABLE mytodo.Project2 (
`id` int NOT NULL AUTO_INCREMENT ,
`name` varchar(45) NOT NULL,
`quyu` varchar(60) NOT NULL,
`area` int(10) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8
。提醒如下:
0 row(s) affected, 2 warning(s): 1681 Integer display width is deprecated and will be removed in a future release. 3719 'utf8' is currently an alias for the character set UTF8MB3, but will be an alias for UTF8MB4 in a future release. Please consider using UTF8MB4 in order to be unambiguous.
大概翻译如下:
0行受影响,2条警告:1681整数显示宽度已弃用,将在未来版本中删除。3719“utf8”当前是字符集UTF8MB3的别名,但在将来的版本中将是UTF8MB4的别名。请考虑使用UTF8Mb4。
优化后的SQL:
CREATE TABLE mytodo.Project6 (
`id` int NOT NULL AUTO_INCREMENT ,
`name` varchar(45) NOT NULL,
`quyu` varchar(60) NOT NULL,
`area` int NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=UTF8Mb4