zoukankan      html  css  js  c++  java
  • 错误总结

    一、字段类型

      1、numeric(p,s)

    • p:数字的长度;包含正数与小数部分
    • S:小数部分;
    • 如果设置的小数长度比实际的小,那么小数部分会四舍五入;

    SqlServer 与 decimal 意义是相同的; http://www.cnblogs.com/zhengyunjia/archive/2009/11/12/1601549.html

    oraclehttp://www.blogjava.net/caojianhua/archive/2011/01/24/343461.html 

    例1:

    declare
      FXZ numeric(2,0); -- 1位小数
    begin
      select 2.1 into FXZ from dual;  
      dbms_output.put_line(FXZ) ;  //2
    end;

    例2:

    declare
    FXZ numeric(2,0); -- 1位小数
    begin
    select 2.5 into FXZ from dual;
    dbms_output.put_line(FXZ) ;  //3
    end;

    例3:

    declare
      FXZ numeric(2,1); -- 1位小数
    begin
      select 2.0 into FXZ from dual;
      dbms_output.put_line(FXZ) ;  //2
    end;

    例4:

    declare
      FXZ numeric(2,1); -- 1位小数
    begin
      select 2.5 into FXZ from dual;
      dbms_output.put_line(FXZ) ;  //2.5
    end;

  • 相关阅读:
    互斥量
    读写锁
    死锁
    pthread
    线程
    守护进程
    信号捕捉
    信号集
    信号
    mmap
  • 原文地址:https://www.cnblogs.com/SunBlog/p/4043231.html
Copyright © 2011-2022 走看看