zoukankan      html  css  js  c++  java
  • 数字 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)

  • 相关阅读:
    fetch的使用--当无法判断后台返回数据为什么类型时如何操作
    单页面与多页面间的区别及优缺点
    关于倒计时在关屏后不准确的问题
    前端分页仿百度分页效果
    pc端的弹性布局适配方案
    前端性能优化方向
    居民身份证号码组成规则
    axios简单介绍
    es6 promise 简单总结
    js原型链和原型链的继承
  • 原文地址:https://www.cnblogs.com/kakaisgood/p/9566207.html
Copyright © 2011-2022 走看看