Re: What does all_tab_columns.data_length actually store?

From: Jusung Yang <JusungYang_at_yahoo.com>
Date: 11 Jun 2003 12:19:41 -0700
Message-ID: <130ba93a.0306111119.60ad8bb2_at_posting.google.com>


DATA_LENGTH is measured in byte.
Are these two users in the same database? What do you see with these?

show parameter semantics
select DATA_LENGTH,CHAR_LENGTH,CHARACTER_SET_NAME from user_tab_columns .... select * from v$nls_parameters where parameter like '%CHARACTERSET';

  • Jusung Yang

mark.leonard_at_tertio.com (Mark Leonard) wrote in message news:<467336d2.0306110309.25e9f48d_at_posting.google.com>...
> Can somebody please shed some light on the following?
>
> I have created two Oracle (9.2) users and some tables by running a
> .sql script (using sqlplus) twice in the same UNIX environment.
>
> Therefore I expect the tables to have the same properties, just
> different owners. However, this does not appear to be the case. Here
> are some sample outputs. The table name has been changed...
>
> User 1:
>
> SQL> desc my_table_name;
> Name Null? Type
> ------------------------------------ --------
> --------------------------------
> DATESTAMP NOT NULL DATE
> COMPONENTID NOT NULL VARCHAR2(12 CHAR)
>
> select column_name, data_type, data_length, data_precision, data_scale
> from all_tab_columns where table_name = 'MY_TABLE_NAME'
>
> COLUMN_NAME DATA_TYPE DATA_LENGTH DATA_PRECISION
> DATA_SCALE
> --------------------- -------------------- ----------- --------------
> ----------
> DATESTAMP DATE 7
> COMPONENTID VARCHAR2 48
>
> (Log out and log in as) User 2:
>
> SQL> desc my_table_name;
> Name Null? Type
> -------------------------------------- --------
> --------------------------------
> DATESTAMP NOT NULL DATE
> COMPONENTID NOT NULL VARCHAR2(12)
>
> select column_name, data_type, data_length, data_precision, data_scale
> from all_tab_columns where table_name = 'MY_TABLE_NAME'
>
> COLUMN_NAME DATA_TYPE DATA_LENGTH DATA_PRECISION
> DATA_SCALE
> --------------------- -------------------- ----------- --------------
> ----------
> DATESTAMP DATE 7
> COMPONENTID VARCHAR2 12
Received on Wed Jun 11 2003 - 21:19:41 CEST

Original text of this message