To start with, you could look at DBA_TAB_COLUMNS:

select table_name,
       column_name,
       data_type
  from dba_tab_columns
 where owner = 'SCHEMA_OWNER';

or

select table_name,
       column_name,
       data_type
  from dba_tab_columns
 where table_name = 'TABLE_NAME';

Create your table:

CREATE TABLE TAB_COLUMNS
(
    TABLE_NAME VARCHAR2(30)  NOT NULL ,
    COLUMN_NAME VARCHAR2(30)  NOT NULL ,
    DATA_TYPE VARCHAR2(106)
);

and simply:

insert into TAB_COLUMNS (select table_name,
                                column_name,
                                data_type
                           from dba_tab_columns
                          where table_name = 'TABLE_NAME');

What do you actually want to do this for?

<SHAMELESS PLUG>

If this is to "document", I have a far easier way of "documenting" the DDL,
and dependencies for tables/objects within a schema, and yes it is with a
tool, but it's a free tool, so I don't feel too shameful about plugging it!
;)

Check out:

http://www.cool-tools.co.uk/Products/dbatool.html

Take an export with rows=n of your schema, feed it in to the tool, and
generate yourself a nice set of html files that will show you the structure
of the tables/objects, and all dependencies on that object. All you have to
do then is load the html files to an intranet or something.. This also has
an added benefit in that the whole process (apart from the actual export) is
totally unobtrusive to the database.

</SHAMELESS PLUG> ;)

HTH

Mark

===================================================
 Mark Leith             | T: +44 (0)1905 330 281
 Sales & Marketing      | F: +44 (0)870 127 5283
 Cool Tools UK Ltd      | E: [EMAIL PROTECTED]
===================================================
           http://www.cool-tools.co.uk
       Maximising throughput & performance


-----Original Message-----
[EMAIL PROTECTED]
Sent: 25 March 2002 10:53
To: Multiple recipients of list ORACLE-L


Hallo,

is there any way to create a  table of the definition of table( list of
field names and their datatypes, indexes etc)

Thanks in advance


Roland S

--
Please see the official ORACLE-L FAQ: http://www.orafaq.com
--
Author:
  INET: [EMAIL PROTECTED]

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).

-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Mark Leith
  INET: [EMAIL PROTECTED]

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).

Reply via email to