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的更多相关文章

  1. 常用function() 收集

    1.随机数生成函数(来源-微信支付demo案例) /** * * 产生随机字符串,不长于32位 * @param int $length * @return 产生的随机字符串 */ public st ...

  2. JS实现输入框只能输入数字

    键盘下落事件实现输入框只能输入数字: <script type="text/javascript"> // 实现输入框只能输入数字 function ValidateN ...

  3. 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 ...

  4. 在 shell 脚本获取 ip、数字转换等网络操作

    在 shell 脚本获取 ip.数字转换等网络操作 ip 和数字的相互转换 ip转换为数字 :: function ip2num() { local ip=$1 local a=$(echo $ip ...

  5. EasyUI分页索引不能输入非数字

    //分页索引不能输入非数字 function PagerCheck() { $(".pagination-num").keydown(function (event) { even ...

  6. 禁止输入中文 与 禁止输入数字在phonegap api环境效果

    例子如下: <!doctype html> <html> <head> <meta charset="utf-8"> <tit ...

  7. EXCEL表格单元格中包含数字英文和汉字,如何自动去掉汉字,保留英文和数字

    EXCEL表格单元格中包含数字英文和汉字,如何自动去掉汉字,保留英文和数字 Function 求数字和字母(对象 As String) '在文本与数字混杂中提取数字和字母   Dim myReg    ...

  8. JavaScript过滤除连续的数字

    if (!Array.prototype.forEach) { Array.prototype.forEach = function (callback, thisArg) { var T, k; i ...

  9. Javascript 正则表达式校验数字

    $("input[datatype=number]").blur(function () {                      var str = $(this).val( ...

随机推荐

  1. 【COGS 14】 [网络流24题] 搭配飞行员 网络流板子题

    用网络流水二分图的模型(存一下板子) #include <cstdio> #include <cstring> #include <algorithm> #defi ...

  2. Android开发注意点小记

    暂时主要讨论以下几点: Android引用外部包,报NoClassDefFoundError异常崩溃 同名包引用关系问题 程序图标 9patch图片素材 Android引用外部包,程序报java.la ...

  3. 活泼的CSS 3动态气泡按钮制作

    这一次,我们正在创造一个有用的设置与对CSS3的多重背景和动画的力量动画按钮.通过此按钮包,您可以很容易地变成一个动画按钮,在您的网页上的任何链接只是指定一个类名.没有必要JavaScript.四色主 ...

  4. 如何记录MySQL执行过的SQL语句

    很多时候,我们需要知道 MySQL 执行过哪些 SQL 语句,比如 MySQL 被注入后,需要知道造成什么伤害等等.只要有 SQL 语句的记录,就能知道情况并作出对策.服务器是可以开启 MySQL 的 ...

  5. auto login vpnclient bat

    @echo offstart "" /b "C:\Program Files (x86)\Cisco Systems\VPN Client\vpngui.exe" ...

  6. eclipse 主题文件配置

    eclipse市场搜索 Eclipse Color Theme ----用于控制文本域主题 Eclipse 4 Chrome Theme  chrome风格的主题 最新的:Jeeeyul's Them ...

  7. java属性为什么没多态,而是方法多态

    定义 java多肽的特性:方法具有多态性,属性却没有. 准备 基类: 子类: 测试类: 结果: 分析如下 父类 a=new 子类,实际对象时子类.由于向上转型,我们可以用父类在编译期间代替子类,使得编 ...

  8. 计算机网络中七层,五层,四层协议;IP 地址子网划分

    七层协议: 7 应用层(http) 6 表示层(上层用户可以相互识别的数据:jpg) 5 会话层(不同主机不同线程间的通信) 4 运输层(tcp/ip:传输层提供端到端的透明数据服务)/差错控制和流量 ...

  9. 【LA3487】最小割-经典模型 两种方法

    题目链接 题意:A.B两个公司要买一些资源(他们自己买的资源不会重复),一个资源只能卖给一个公司.问最大收益. simple input 部分: 54 1 //买到1就给54元 15 2 33 3 2 ...

  10. 【BZOJ3680】吊打xxx [模拟退火]

    吊打XXX Time Limit: 10 Sec  Memory Limit: 128 MB[Submit][Status][Discuss] Description gty又虐了一场比赛,被虐的蒟蒻 ...