Home » SQL & PL/SQL » SQL & PL/SQL » data_length in user_tab_columns
data_length in user_tab_columns [message #183797] Sun, 23 July 2006 22:55 Go to next message
Messages: 84
Registered: April 2005
Location: India

I just what to know what is data_length in user_tab_columns if column data type is NUMBER. what i think is Data Precision makes the length of NUMBER data field in table.

if anybody can tell me what is the significance of data_length with length 22 & data precsion 10 in case of number data type?

Thanks & Regards
Chandan Singh
Re: data_length in user_tab_columns [message #183813 is a reply to message #183797] Mon, 24 July 2006 01:11 Go to previous messageGo to next message
Messages: 21148
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Read all about NUMBER datatype in Oracle documentation.
Re: data_length in user_tab_columns [message #183841 is a reply to message #183797] Mon, 24 July 2006 02:21 Go to previous message
Messages: 5933
Registered: June 2006
Location: Sunny North Yorkshire, ho...
Senior Member
For Numbers, the length is always 22, and can be ignored.
You want to look at the data_length and data_scale columns:

SQL> create table temp_u_t_c
  2  (col_1 number (10,0)
  3  ,col_2 number (10,2));

Table created.

SQL> select table_name,column_name,data_type, data_length,data_precision, data_scale
  2  from user_tab_columns where table_name = 'TEMP_U_T_C';

-------------------- -------------------- -------------------- ----------- -------------- ----------
TEMP_U_T_C           COL_1                NUMBER                        22             10          0
TEMP_U_T_C           COL_2                NUMBER                        22             10          2
Previous Topic: help with pl/sql code
Next Topic: sql query
Goto Forum:

Current Time: Sun Aug 20 08:49:36 CDT 2017

Total time taken to generate the page: 0.11236 seconds