开发者

SQL - Which data type represents percentages well?

In SQL I am looking at decimal and float. Float says it is an approximation. I need to store percentages. They don't have to be very large or small. Some examples are

60.开发者_运维百科2

40

Which data type should I use?


decimal(x,y)

x is the total number of digits you want to be able to represent

y is the total number of digits after the decimal point that you want to be able to represent

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜