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. 微信小程序base64编码解码以及utf-8解码

    function base64_encode (str) { // 编码,配合encodeURIComponent使用 var c1, c2, c3; var base64EncodeChars = ...

  2. ViBe(Visual Background extractor)背景建模或前景检测

    ViBe算法:ViBe - a powerful technique for background detection and subtraction in video sequences 算法官网: ...

  3. 运动目标前景检测之ViBe源代码分析

    一方面为了学习,一方面按照老师和项目的要求接触到了前景提取的相关知识,具体的方法有很多,帧差.背景减除(GMM.CodeBook. SOBS. SACON. VIBE. W4.多帧平均……).光流(稀 ...

  4. poj 1523 割点 tarjan

    Description Consider the two networks shown below. Assuming that data moves around these networks on ...

  5. 在Global.asax中过滤POST请求的非法参数。

    using System;using System.Collections.Generic;using System.Collections.Specialized;using System.Linq ...

  6. Python爬虫学习笔记之爬今日头条的街拍图片

    代码: import requests import os from hashlib import md5 from urllib.parse import urlencode from multip ...

  7. shell分发文件脚本

    配置文件scp.conf ssh_hosts=("IP") #需要分发机器的所有IP ssh_ports=("22") ssh_users=("roo ...

  8. [转]使用 LDAP OU 限制访问

    使用 LDAP OU 限制访问 http://www-01.ibm.com/support/knowledgecenter/api/content/SSEP7J_10.2.2/com.ibm.swg. ...

  9. DotNETCore 学习笔记 宿主

    Hosting -------------------------------------------------------------------------- Setting up a Host ...

  10. [bzoj2049][Sdoi2008]Cave 洞穴勘测——lct

    Brief Description 给定一个森林,您需要支持两种操作: 链接两个节点. 断开两个节点之间的链接. Algorithm Design 对于树上的操作,我们现在已经有了树链剖分可以处理这些 ...