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: DA Morgan <damorgan_at_x.washington.edu>
Date: Mon, 25 Oct 2004 20:48:10 -0700
Message-ID: <1098762433.456396@yasure>


Praveen wrote:

> Hi..Daniel,
> 
>    But this doesn't work for Number field. The length in the
> user_tab_columns is different from DESC. Why?
> 
> DA Morgan wrote:
> 

>>Praveen wrote:
>>
>>
>>
>>>------------------------------------------------------------------------
>>>
>>
>>
>>desc <table_name>
>>
>>SELECT column_name, DECODE(nullable, 'N', 'NOT NULL', NULL) "Null?",
>>data_type || '(' || data_length || ')' TYPE
>>FROM user_tab_columns
>>WHERE table_name = <table_name>
>>
>>No difference except a column title and that's easily fixed.

For numbers and dates you need to reference the appropriate columns or use the appropriate functions. For numbers ... remember there is the possibility of (7,3) ... each stored in a separate column in the view.

-- 
Daniel A. Morgan
University of Washington
damorgan_at_x.washington.edu
(replace 'x' with 'u' to respond)
Received on Mon Oct 25 2004 - 22:48:10 CDT

Original text of this message

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