precision是总长度
scale是小数点后的位数

解决方案 »

  1.   

    precision是总长度(包括小在内的总长度)
    scale是小数点后的位数
      

  2.   

    NUMBER(precision,scale)
    precision为数字的总长度,scale为小数位数。
      

  3.   

    NUMBER  You use the NUMBER datatype to store fixed-point or floating-point numbers. Its
    magnitude range is 1E-130 .. 10E125. If the value of an expression falls outside this range, you get a numeric overflow or underflow error. You can specify precision, which is the total number of digits, and scale, which is the number of digits to the right of the decimal point. The syntax follows:
      NUMBER[(precision,scale)]To declare fixed-point numbers, for which you must specify scale, use the following form:
      NUMBER(precision,scale)To declare floating-point numbers, for which you cannot specify precision or scale
    because the decimal point can "float" to any position, use the following form:NUMBERTo declare integers, which have no decimal point, use this form:NUMBER( precision) -- same as NUMBER( precision,0)You cannot use constants or variables to specify precision and scale; you must use
    integer literals. The maximum precision of a NUMBER value is 38 decimal digits. If
    you do not specify precision, it defaults to 38 or the maximum supported by your
    system, whichever is less.Scale, which can range from -84 to 127, determines where rounding occurs. For
    instance, a scale of 2 rounds to the nearest hundredth (3.456 becomes 3.46). A
    negative scale rounds to the left of the decimal point. For example, a scale of -3
    rounds to the nearest thousand (3456 becomes 3000). A scale of 0 rounds to the
    nearest whole number. If you do not specify scale, it defaults to 0.
      

  4.   

    i number(10,2);
    表示定义i为number数据类型,总长度10位,小数两位.
      

  5.   

    precision总长度
    scale小数位数