-
问题描述
在Python中使用pymysql出现如题警告:
/home/data/anaconda3/lib/python3.7/site-packages/pymysql/cursors.py:170: Warning: (1681, 'Integer display width is deprecated and will be removed in a future release.') result = self._query(query)
-
解决方案
创建表格时
INT(M)
这种用法是一种扩展属性,M
表示整数数据类型的显示宽度(display width
)。对于浮点和定点数据类型,M表示可以存储的总位数。
这个
display width
的功能后续MySQL版本会删除,因此不建议使用。将
INT(M)
改为INT
。 -
References
170: Warning: (1681, 'Integer display width is deprecated and will be removed in a future release.')
最新推荐文章于 2022-10-30 19:17:33 发布