zoukankan      html  css  js  c++  java
  • oracle round 函数,replace()函数

    (1)如何使用 Oracle Round 函数 (四舍五入)
    描述 : 传回一个数值,该数值是按照指定的小数位元数进行四舍五入运算的结果。
    SELECT ROUND( number, [ decimal_places ] ) FROM DUAL
    参数:
    number : 欲处理之数值
    decimal_places : 四舍五入 , 小数取几位 ( 预设为 0 )
    Sample :
    select round(123.456, 0) from dual; 回传 123
    select round(123.456, 1) from dual; 回传 123.5
    select round(123.456, 2) from dual; 回传 123.46
    select round(123.456, 3) from dual; 回传 123.456
    select round(-123.456, 2) from dual; 回传 -123.46

    2,replace()
    replace(x,y,z)返回值为将串X中的Y串用Z串替换后的结果字符串。若省略Z参数,则将串X中为Y串的地方删除
  • 相关阅读:
    多线程
    泛型
    枚举、注解
    重写comparater比较器
    Arrays工具类和Collections工具类
    重写equals和hashCode的方法
    遍历集合的方法
    关键字总结
    having 的用法
    HTTP协议
  • 原文地址:https://www.cnblogs.com/alsf/p/6019552.html
Copyright © 2011-2022 走看看