Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Name of databases, tables, attributes and types
Marc Mouries wrote:
>
> Hello Everybody,
>
> Does anybody know how to get :
>
> - the names of all the databases
>
> - for each database, the name of all its tables
>
> - for each table, the name of all its attributes with their type
>
> Do you know the tables I hava to query to get these infos ?
>
> --
> \
> |\
If logged on as dba, query dba_tables and dba_tab_columns to get all tables and all attributes.
To get all table by owner:
select owner, table_name from dba_tables order by 1, 2;
To get data types by owner/table in column order:
select owner, table_name, column_name, data_type, data_length,
data_precision, data_scale
oder by owner, table_name, column_id;
Not sure what you mean by "names of all the databases". Do you mean all the instances on a given machine, all instances in some network, etc?
Chris Halioris
Tactics, Inc.
Received on Fri Feb 07 1997 - 00:00:00 CST