Oracle number syntax and number syntax are very simple: number (p, s) p, s are optional, if not filled, p is 38 by default, s is-48 ~ by default ~ 127. 1. precision, or the total number of digits. By default, the precision is 38 BITs and the value range is 1 ~ Between 38. You can also use the character * to indicate 38. 2. the decimal point (scale) or the number of digits on the right of the decimal point. Valid decimal places:-48 ~ 127. The default value depends on whether precision is specified. If you do not know the precision, the number of decimal places has the maximum default value range. If the precision is specified, the default number of decimal places is 0 (none on the right of the decimal point ). For example, columns defined as NUMBER store floating-point numbers (with decimal places), while NUMBER (38) only stores integer data (without decimal places), because in the second case, the default decimal places are 0. www.2cto.com: create table t (msg varchar2 (12 .), num_col number (123); insert into t (msg, num_col) values ('2017. 456 ', 123.456); // The execution is successful. The 123.46 insert into t (msg, num_col) values ('20160901', 1234) is saved. // The execution fails, to retain two decimal places, the entire number can be up to three digits, which is now four digits. If scale is a negative number, it indicates the number of rounded digits on the left: create table t (msg varchar2 (12 .), num_col number (5,-2); insert into t (msg, num_col) values ('2017. 45', 123.45); // The execution is successful. The 100 insert into t (msg, num_col) values ('2017. 456 ', 123.456); // The execution is successful, and 100 of other data types are saved: 1. NUMERIC (p, s): fully mapped to NUMBER (p, s ). If p is not specified, the default value is 38. 2. DECIMAL (p, s) or DEC (p, s): fully mapped to NUMBER (p, s ). If p is specified, the default value is 38. 3. INTEGER or INT: fully mapped to the NUMBER (38) type. 4. SMALLINT: fully mapped to the NUMBER (38) type. 5. FLOAT (B): ing TO THE NUMBER type. 6. double precision: ing to NUMBER type. 7. REAL: ing to NUMBER type. Www.2cto.com performance considerations: Generally, the Oracle NUMBER type is the best choice for most applications. However, this type may have some performance impact. Oracle NUMBER is a type of software data that is implemented in the Oracle software. We cannot use inherent hardware operations to add two NUMBER types, which should be simulated in software. However, floating point numbers are not implemented in this way. When two floating point numbers are added, Oracle uses hardware to perform operations. In other words, adding the number columns of some columns does not add a series of float columns quickly. Because float columns have much lower precision, generally 6 ~ 12 digits. For example, select sum (ln (cast (num_type as binary_double) from t is much faster than select sum (ln (cast (num_type) from t.