mysql - MYSQL - 警告:不推荐使用整数显示宽度
问题描述
我看到这个警告:MYSQL - 警告:#1681 不推荐使用整数显示宽度。MySQL版本:8.0.21
过去,我有显示宽度 (INT(20)) 的列,但我删除了所有列。如您所见,没有显示宽度的列:
询问:
select count(*), COLUMN_TYPE from information_schema.`COLUMNS`
WHERE COLUMN_TYPE LIKE "%int%"
GROUP by COLUMN_TYPE;
结果:
count(*) column_type
2068 bigint
96 tinyint(1)
2285 int
1267 bigint unsigned
32 tinyint
74 int unsigned
6 smallint unsigned
1 tinyint unsigned
1 smallint
正如我所读,tinyint(1) 被忽略: https ://dev.mysql.com/doc/relnotes/mysql/8.0/en/news-8-0-19.html
问题是,我怎样才能让这个警告消失:)
提前致谢!
解决方案
推荐阅读
- npm - npm install package.js - 我可以恢复到早期的包吗?
- php - 如何使用 jQuery 插件修改 cookie 的值?
- qt - 如何更改 QML 按钮 Qt Quick Controls 2 的背景颜色?
- typescript - 初始化 Google Passportjs 策略错误
- android - Android 选择器意图返回低质量图像(缩略图)的 URI 注 8
- javascript - 新的谷歌脚本版本抛出 javascript 错误
- reactjs - 使用 React-native-ble-plx 配置 React-native
- webpack - 创建 js webpack 配置
- vba - Excel 颜色代码的 VBA
- ruby-on-rails - 客户端应用程序如何针对门卫身份验证服务器重新对用户进行身份验证?