What is the default Precision and Scale for a Number in Oracle?

前端 未结 6 656
时光说笑
时光说笑 2020-12-01 07:13

When creating a column of type NUMBER in Oracle, you have the option of not specifying a precision or scale. What do these default do if you don\'t specify them?

6条回答
  •  一整个雨季
    2020-12-01 07:44

    Actually, you can always test it by yourself.

    CREATE TABLE CUSTOMERS ( CUSTOMER_ID NUMBER NOT NULL, JOIN_DATE DATE NOT NULL, CUSTOMER_STATUS VARCHAR2(8) NOT NULL, CUSTOMER_NAME VARCHAR2(20) NOT NULL, CREDITRATING VARCHAR2(10) ) ;

    select column_name, data_type, nullable, data_length, data_precision, data_scale from user_tab_columns where table_name ='CUSTOMERS';

提交回复
热议问题