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: Column Structure!

Re: Column Structure!

From: GHouck <hksys_at_teleport.com>
Date: Mon, 27 Mar 2000 03:05:35 -0800
Message-ID: <38DF407F.64AB@teleport.com>


Maxx wrote:
>
> How does one extract the column structures for one table only from
> user_tables_columns? The describe command is insufficient here. If anyone
> has any suggestions, I'd be profounfly appreciative.

SELECT
  cols.column_name AS Name,
  nullable,
  data_type AS TYPE,
  DECODE( data_type,
  'NUMBER',

  data_precision + data_scale,
  data_length ) LENGTH,
  data_precision Precision,
  data_scale Scale,
  data_length dlength,
  data_default    ,

  ' ' comments
FROM
  DBA_TAB_COLUMNS cols
WHERE
  cols.table_name = 'MYTABLE' AND
  cols.owner = 'MYOWNER'
ORDER BY column_id

I plagiarized this from T.O.A.D's SQL spooler.

Yours,

Geoff Houck
systems hk
hksys_at_teleport.com
http://www.teleport.com/~hksys Received on Mon Mar 27 2000 - 05:05:35 CST

Original text of this message

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