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

Home -> Community -> Usenet -> c.d.o.server -> Re: Transitioning to Oracle: How can you list out the names of all tables and fields?

Re: Transitioning to Oracle: How can you list out the names of all tables and fields?

From: DA Morgan <damorgan_at_psoug.org>
Date: Sun, 12 Aug 2007 11:39:10 -0700
Message-ID: <1186943950.493802@bubbleator.drizzle.com>


carnahan.tom_at_gmail.com wrote:
> I am transitioning to Oracle from SQL Server using a poorly documented
> application that uses Oracle 9 as its back end.
>
> SQL Server has a command that dumps the names of all Fields in all
> Tables.
>
> Is there a similar command I can execute to do the same with Oracle?

set linesize 121
col data_type format a30

SELECT owner, table_name, column_name, data_type FROM all_tab_columns
ORDER BY owner, table_name, column_id;

Familiarize yourself with the Oracle data dictionary views.

SELECT view_name
FROM all_views
WHERE view_name LIKE '%COL%';

for example.

And remember Oracle is nothing like SQL Server. Get a copy of Tom Kyte's book Expert One-on-One Oracle and read the concept docs at http://tahiti.oracle.com. You will also find demos of the most used Oracle functionality in Morgan's Library at www.psoug.org.

-- 
Daniel A. Morgan
University of Washington
damorgan_at_x.washington.edu (replace x with u to respond)
Puget Sound Oracle Users Group
www.psoug.org
Received on Sun Aug 12 2007 - 13:39:10 CDT

Original text of this message

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