Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/algorithm/11.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
MYSQL-警告:不推荐使用整数显示宽度_Mysql - Fatal编程技术网

MYSQL-警告:不推荐使用整数显示宽度

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

我看到了这个警告: 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)被忽略:

问题是,我如何才能让这个警告消失:)


提前谢谢

但问题是什么?所有int都使用相同的字节数,与int后面的数字无关,因此删除它是正确的。@akina,问题是,我如何才能消除此警告:)