当前位置:网站首页>MySQL里记录货币
MySQL里记录货币
2022-07-01 05:54:00 【明明就很安静】
货币在数据库中MySQL常用Decimal和Numric类型表示,这两种类型被MySQL实现为同样的类型。
为什么使用Decimal和Numric类型,而不是用float和double类型呢?
原因:DECIMAL和NUMERIC值作为字符串存储,而不是作为二进制浮点数,以便保存那些值的小数精度。而float和double是以二进制存储的,有一定的误差,不适合做金额存储得数据类型。
边栏推荐
猜你喜欢

It's not that you have a bad mind, but that you haven't found the right tool

Send you through the data cloud

千万不要把笔记视频乱放!

Multi label lsml for essay learning records

π disk, turning your computer into a personal private cloud

OneFlow源码解析:算子签名的自动推断

如何添加葫芦儿派盘

Seven major technical updates that developers should pay most attention to on build 2022

SystemVerilog学习-08-随机约束和线程控制

CJC8988带2个立体声耳机驱动器的低功率立体声编解码器
随机推荐
CJC8988带2个立体声耳机驱动器的低功率立体声编解码器
数据库问题,如何优化Oracle SQL查询语句更快,效率更高
Dear pie users, I want to confess to you!
1034 Head of a Gang
【考研高数 自用】高数第一章基础阶段思维导图
skywalking集成nacos动态配置
基于LabVIEW的计时器
关于一道01背包问题的·拓展题的思考
Multi label lsml for essay learning records
Geoffrey Hinton:我的五十年深度学习生涯与研究心法
Code shoe set - mt3149 · and - the data is not very strong. Violent pruning can deceive AC
从诺奖知“边缘计算”的未来!
excel可视化
论文学习记录随笔 多标签之GLOCAL
Send you through the data cloud
DEV XPO对比之UOW
This is the necessary software for college students 𞓜 knowledge management
OpenGL es: (3) EGL, basic steps of EGL drawing, eglsurface, anativewindow
栈题目:解析布尔表达式
Smartinstantiationawarebeanpostprocessor of the extension point series determines which construction method to execute - Chapter 432