MYSQL-警告:不推荐使用整数显示宽度
我看到了这个警告: MYSQL-警告:#1681整数显示宽度不推荐使用。 MySQL版本:8.0.21 在过去,我有显示宽度(INT(20))的列,但我删除了所有列。 如您所见,没有显示宽度为的列: 查询:MYSQL-警告:不推荐使用整数显示宽度,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
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)被忽略:
问题是,我如何才能让这个警告消失:)
提前谢谢 但问题是什么?所有int都使用相同的字节数,与int后面的数字无关,因此删除它是正确的。@akina,问题是,我如何才能消除此警告:)