mysql向数据库插入小数,变成了整数,解决方案 |
您所在的位置:网站首页 › Python中int类型设置为空存入数据库 › mysql向数据库插入小数,变成了整数,解决方案 |
mysql向数据库插入小数,变成了整数, 导致这个问题的原因是: 在设计表的时候,得定义表字段小数点的位数; 示例sql语句: mysql> create table MyClass( > id int(4) not null primary key auto_increment, > name char(20) not null, > sex int(4) not null default '0', > degree double(16,2));double(16,2) 16位长度,小数点后2位。 |
今日新闻 |
点击排行 |
|
推荐新闻 |
图片新闻 |
|
专题文章 |
CopyRight 2018-2019 实验室设备网 版权所有 win10的实时保护怎么永久关闭 |