oracle study notes number

1. Number can store integers and non-integers. When storing non-integer numbers, the number of significant digits is called the precision, and the fractional part to the right is called the scale (number of decimal places).

 

For example: the number 29.1963 has a precision of 6 and a scale of 4. The maximum precision is 38, and the data shows that the maximum scale can be 127. I also created fields other than number(38,127) in my local test, but I have not been able to successfully insert numbers.

 

2. Create a table

create table T_TEST

(

  ID            VARCHAR2(32) not null,

  TEST_VARCHAR2 VARCHAR2(4000),

  USERNAME      VARCHAR2(6),

  TEST_NUMBER   NUMBER(38,17)

)

 

3. Insert 38-17, 21 integers and 17 decimals

insert into t_test

  (id, test_number)

values('1',111111111111111111111.1111111111111111111111111111);

 

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=327076028&siteId=291194637