阅读目录 数值类型 日期时间类型 字符串类型 ENUM和SET类型 数值类型 MySQL支持所有标准SQL数值数据类型。 这些类型包括严格数值数据类型(INTEGER、SMALLINT、DECIMAL和NUMERIC),以及近似数值数据类型(FLOAT、REAL和DOUBLE PRECISION)。 ...
分类:
数据库 时间:
2020-06-13 12:39:34
阅读次数:
58
/** * 设置金钱格式 * @param {Number} value [金钱数值] */ function Money(value, symbol = "¥") { if (value) { var pre = decimal = s1 = s2 = ''; value = String(val ...
分类:
其他好文 时间:
2020-06-10 19:06:39
阅读次数:
54
一、常用函数 1、decimal decimal(14,2):14位数,小数占两位;decimal(26,8),有效长度为26,小数位占8位。 2、cast cast:Oracle中的数据类型转换函数,将某种数据类型的表达式显式转换为另一种数据类型。 3、decode decode(条件,值1,返回 ...
分类:
其他好文 时间:
2020-06-07 10:46:13
阅读次数:
152
decimal 模块:decimal意思为十进制,这个模块提供了十进制浮点运算支持 1.可以传递给Decimal整型或者字符串参数,但不能是浮点数据,因为浮点数据本身就不准确。 2.要从浮点数据转换为Decimal类型 from decimal import * Decimal.from_float ...
分类:
编程语言 时间:
2020-06-03 23:40:13
阅读次数:
160
1049 Counting Ones (30分) The task is simple: given any positive integer N, you are supposed to count the total number of 1's in the decimal form of th ...
分类:
其他好文 时间:
2020-05-29 23:43:50
阅读次数:
106
题目 The decimal expansion of the fraction 1/33 is 0.03, where the 03 is used to indicate that the cycle 03repeats indefinitely with no intervening digi ...
分类:
其他好文 时间:
2020-05-28 00:54:20
阅读次数:
110
ABS() 取数据的绝对值 select abs(-12) CEIL() 返回大于或等于参数的最小整数。 ceil(double a), ceil(decimal(p,s) a), ceiling(double a), ceiling(decimal(p,s) a), dceil(double a) ...
分类:
其他好文 时间:
2020-05-26 18:40:44
阅读次数:
215
列表 列表功能(划分区域):把相同的类别的内容展示到一个区域 1.有序列表 父元素:ol (ordered list) 子元素只能是:li (list item) 列表项 默认状态:元素内容之前会有一个阿拉伯数字(从1依次递增) 改变有序列表的样式: list-style取值 decimal 阿拉伯 ...
分类:
其他好文 时间:
2020-05-26 12:19:54
阅读次数:
85
创建表 CREATE TABLE `products` ( `id` int(11) NOT NULL AUTO_INCREMENT, `name` varchar(255) NOT NULL, `price` decimal(10,2) DEFAULT NULL, PRIMARY KEY (`id ...
分类:
数据库 时间:
2020-05-23 14:47:10
阅读次数:
92
如:在前端界面上,中的已交付数量有两位小数 现在说这后两位有小数很难受,要变成整数,有多种方式,如将他强转为整数,或截取小数点前面的。。。 这里介绍一个,不过在数据库中这字段的类型要是 decimal 类型, decimal(18, 2): 这个就是大致意思是,共有18位,小数点后有两位 所以: 只 ...
分类:
数据库 时间:
2020-05-20 14:01:38
阅读次数:
66