没有合适的资源?快使用搜索试试~ 我知道了~
首页170: Warning: (1681, ‘Integer display width is deprecated and will be removed in a future release.’)
问题描述 在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)。 对于浮点和定点数据类型
资源详情
资源评论
资源推荐

170: Warning: (1681, ‘Integer display width is deprecated
and will be removed in a future release.’)
问题描述问题描述
在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
MYSQL – Warning: #1681 Integer display width is deprecated
MySQL出现警告:Integer display width is deprecated and will be removed in a future release
WL#13127: Deprecate integer display width and ZEROFILL option
作者:Quant_Learner




















安全验证
文档复制为VIP权益,开通VIP直接复制

评论0