Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> NUMBER data type question

NUMBER data type question

From: <david_petit_at_yahoo.com>
Date: 2000/03/12
Message-ID: <8agk0g$8hc$1@nnrp1.deja.com>#1/1

Hello all,

   When I create table with column a with numeric data type as follows:

SQL> create table testing (a number(15,2));

Table created.

SQL> desc testing;

 Name                            Null?    Type
 ------------------------------- -------- ----
 testing                                  NUMBER(15,2)

   When I query the all_tab_columns, the definition of a in testing is:

   DATA_TYPE DATA_LENGTH DATA_PRECISION DATA_SCALE N COLUMN_ID DEFAULT_LENGTH

   Now, I drop the table and create again:

SQL> create table testing (a number);

Table created.

SQL> desc testing;

 Name                            Null?    Type
 ------------------------------- -------- ----
 testing                                  NUMBER

   When I query the all_tab_columns, the definition of a in testing is:

   DATA_TYPE DATA_LENGTH DATA_PRECISION DATA_SCALE N COLUMN_ID DEFAULT_LENGTH

   My question is, why the data length of both table definitions are 22? Should I ignore the value of DATA_LENGTH column when the data type is NUMBER? If yes, how can I know the exact value of DATA_LENGTH if the data type is NUMBER and DATA_PRECISION is NULL value?

Thanks,
David

Sent via Deja.com http://www.deja.com/
Before you buy. Received on Sun Mar 12 2000 - 00:00:00 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US