data_length column in data dictionary table
DBAsupport.com Forums - Powered by vBulletin
Results 1 to 4 of 4

Thread: data_length column in data dictionary table

  1. #1
    Join Date
    Feb 2000
    Location
    NJ, United States
    Posts
    250

    Angry

    I was trying to extract data length for all numeric columns in my database from the user_tab_columns view.

    I found a very surprising thing. The data_length we get by desc statement is entirely different from the data_length field in the user_tab_columns. Basically for all numeric fields the data_length is always 22 in the view. What does the data_length field in the user_tab_columns give us??!!!

    Eg: Observe the Due_adj_amt field from Desc statement
    COLUMN_NAME DATA_TYPE DATA_LENGTH
    CURR_CD VARCHAR2 8
    DUE_ADJ_AMT NUMBER 17
    CATEGORY_DESC VARCHAR2 100
    SYSTEM_FIX CHAR 1
    SCRUBBED CHAR 1
    and the due_adj_amt data_length from the user_tab_columns view:
    COLUMN_NAME DATA_LENGTH
    DUE_ADJ_AMT 22


    Thanx in advance,

    Kavita

    KN

  2. #2
    Join Date
    Feb 2000
    Location
    NJ, United States
    Posts
    250

    Talking

    Any answers?????
    KN

  3. #3
    Join Date
    Sep 2001
    Posts
    112
    Put simply, I dont know what the 22 is all about

    BUT

    to measure number lengths

    i.e 15,2

    the 15 is stored in the data_precision column

    the 2 is stored in the data_scale column

  4. #4
    Join Date
    Sep 2001
    Posts
    112
    also data_length gives you the character length of

    char
    nchar
    varchar2
    nvarchar2
    raw

    However this is only based on limited knowledge.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width