数字 function

SELECT
TRUNC(15.79),
TRUNC(15.79,1),
ROUND(15.79),
ROUND(15.79,1),
ROUND(115.79,-2),
FLOOR(26.983),
CEIL(26.123),
SIGN(-25),
SIGN(0),
SIGN(25),
MOD(10,4)
FROM dual;
TRUNC(15.79) TRUNC(15.79,1) ROUND(15.79) ROUND(15.79,1) ROUND(115.79,-2) FLOOR(26.983) CEIL(26.123) SIGN(-25) SIGN(0) SIGN(25) MOD(10,4)
------------ -------------- ------------ -------------- ---------------- ------------- ------------ ---------- ---------- ---------- ----------
15 15.7 16 15.8 100 26 27 -1 0 1 2
TRUNC:
Returns the number or expression passed as parameter
Syntax:
TRUNC(original_number[,n])
The parameter for the number of decimals (n
original number to convert it into an integer.
If n is negative, the function truncates n digits to the left of the decimal point.
ROUND:
Returns the number or expression passed as parameter
Syntax:
ROUND(original_number[,n])
The parameter for the number of decimals (n
original number to convert it into an integer.
If n is negative, the function rounds off n digits to the left of the decimal point.
FLOOR:
Returns the largest integer that is equal to or less than
decimals from the original number, if it is not an integer.
integer.
Syntax:
FLOOR(original_number)
CEIL:
Returns the smallest integer that is greater than or equal to
number passed has decimals it returns the next integer.
Syntax:
CEIL(original_number)
SIGN:
Returns a number that represents the sign of the number passed as parameter
number passed is positive it returns 1, and it returns 0 if the number passed is 0.
Syntax:
SIGN(number)
MOD:
Returns the remainder of the first_number divided by
Syntax:
MOD(first_number,second_number)
数字 function的更多相关文章
- 常用function() 收集
1.随机数生成函数(来源-微信支付demo案例) /** * * 产生随机字符串,不长于32位 * @param int $length * @return 产生的随机字符串 */ public st ...
- JS实现输入框只能输入数字
键盘下落事件实现输入框只能输入数字: <script type="text/javascript"> // 实现输入框只能输入数字 function ValidateN ...
- PHP 汉字数字互转(100以内)| PHP 汉字转数字 | PHP数字转汉字
<?php function numDatabase(){ $numarr =array(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,2 ...
- 在 shell 脚本获取 ip、数字转换等网络操作
在 shell 脚本获取 ip.数字转换等网络操作 ip 和数字的相互转换 ip转换为数字 :: function ip2num() { local ip=$1 local a=$(echo $ip ...
- EasyUI分页索引不能输入非数字
//分页索引不能输入非数字 function PagerCheck() { $(".pagination-num").keydown(function (event) { even ...
- 禁止输入中文 与 禁止输入数字在phonegap api环境效果
例子如下: <!doctype html> <html> <head> <meta charset="utf-8"> <tit ...
- EXCEL表格单元格中包含数字英文和汉字,如何自动去掉汉字,保留英文和数字
EXCEL表格单元格中包含数字英文和汉字,如何自动去掉汉字,保留英文和数字 Function 求数字和字母(对象 As String) '在文本与数字混杂中提取数字和字母 Dim myReg ...
- JavaScript过滤除连续的数字
if (!Array.prototype.forEach) { Array.prototype.forEach = function (callback, thisArg) { var T, k; i ...
- Javascript 正则表达式校验数字
$("input[datatype=number]").blur(function () { var str = $(this).val( ...
随机推荐
- [COGS 2089.] 平凡的测试数据 带权并查集
差点就撸上LCT了....... 带权并查集就是在并查集的基础上稍作修改,我的用穿址实现的有人用记录原父亲来实现. #include<cstdio> #define N 300010 us ...
- nm用法小记
nm用于显示目标文件的符号,也是二进制工具集(info binutils)里的一员 先来看一个例子,源码和对应的命令结果 四部分分别表示的意义 符号所在的obj文件名 符号的值,这里应该是指符号所在段 ...
- 7月19日day11总结
今天学习过程和小结 上午进行测试复习了 1,hdfs中namenode和datanode作用 2,hdfs副本存放机制 3,mapreduce计算处理过程 4,格式化hdfs命令 5,hdfs的核心配 ...
- canvas知识02:图片放大镜效果
效果截图: JS代码: <script> // 初始化canvas01和上下文环境 var cav01 = document.getElementById('cav01'); var cx ...
- cxf+spring发布webservice和调用
maven项目配置http://cxf.apache.org/docs/using-cxf-with-maven.html <properties> <cxf.version> ...
- 按小时或天切割Nginx日志
#按小时或天切割Nginx日志到备份文件夹 LOGS_PATH=/home/www/logs/thc SAVE_PATH=/home/www/logs/thc YESTERDAY=$(date -d ...
- 【Foreign】染色 [LCT][线段树]
染色 Time Limit: 20 Sec Memory Limit: 256 MB Description Input Output Sample Input 13 0 1 0 2 1 11 1 ...
- A way escape rbash
hacker@beta:~$ ls -rbash: /usr/bin/python: restricted: cannot specify `/' in command names ryuu@beta ...
- 【mysql】索引与排序、重复索引、冗余索引
索引与排序 排序可能发生2种情况: 1: 对于覆盖索引,直接在索引上查询时,就是有顺序的, using index 2: 先取出数据,形成临时表做filesort(文件排序,但文件可能在磁盘上,也可能 ...
- HDU3664 Permutation Counting
Permutation Counting Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Oth ...