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

Home -> Community -> Usenet -> c.d.o.misc -> Re: Difference between DESC & user_tab_columns

Re: Difference between DESC & user_tab_columns

From: Ed Prochak <ed.prochak_at_magicinterface.com>
Date: Wed, 27 Oct 2004 00:18:59 -0400
Message-ID: <0jFfd.202$Qy.188@fe39.usenetserver.com>


Praveen wrote:

>
> ------------------------------------------------------------------------
>
> Subject:
> Difference between DESC & user_tab_columns
> From:
> Praveen <nospam_at_nospam.com>
> Date:
> Fri, 22 Oct 2004 12:46:40 -0700
>
>
> Hi..All,
>
> When I do a DESC on a table , one of the columns shows the
> datatype(lenght) as Number(38). But when I look at the details of the
> column it shows something else. How does it come up with a different
> lenght Or where does desc pick it from when you do a DESC? Is there any
> other logic involved?
>
> Column Details :
>
>
> TABLE_NAME COLUMN_NAME
> ------------------------------ ------------------------------
> DATA_TYPE DAT
> ----------------------------------------------------------------------------------------------------------
> ---
> DATA_TYPE_OWNER DATA_LENGTH DATA_PRECISION DATA_SCALE N
> COLUMN_ID DEFAULT_LENGTH
> ------------------------------ ----------- -------------- ---------- -
> ---------- --------------
> DATA_DEFAULT NUM_DISTINCT
> --------------------------------------------------------------------------------
> ------------
> LOW_VALUE
> ----------------------------------------------------------------
> HIGH_VALUE DENSITY NUM_NULLS NUM_BUCKETS LAST_ANAL SAMPLE_SIZE
> ----------------------------------------------------------------
> ---------- ---------- ----------- --------- -----------
> CHARACTER_SET_NAME CHAR_COL_DECL_LENGTH GLO USE AVG_COL_LEN
> -------------------------------------------- -------------------- ---
> --- -----------
> TEST_TABLE TEST_COLUMN
> NUMBER
> 22 0 N 4
> 3
> C102
> C106 .333333333 0 1 26-MAR-04 143
> NO NO 2
>
>
>
>
>
>
> TIA
>
> P/
>

NUMBER(38) where 38 refers to the number of Decimal Digits

compared to a data length of 22BYTES
Why are they different? is that your question?

The numbers seem about right to me. If I did my arithmetic right, 22bytes should hold 50-60 decimal digits. basically they are measuring different units.

Obviously not all the needed info. is available in the USER_TAB_COLUMNS view.

-- 
Ed Prochak
running    http://www.faqs.org/faqs/running-faq/
netiquette http://www.psg.com/emily.html
--
"Two roads diverged in a wood and I
I took the one less travelled by
and that has made all the difference."
robert frost
Received on Tue Oct 26 2004 - 23:18:59 CDT

Original text of this message

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