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: same table_name with different owners

Re: same table_name with different owners

From: Jomarlen <jomarlen_at_aol.com>
Date: 1997/11/18
Message-ID: <19971118184401.NAA23548@ladder02.news.aol.com>#1/1

>Hi,
>I need some suggestions on these.
>I need a efficient way to manage many ( over 100) table which have the
>same table_name but different owners.
>Everytime when I need to alter the tables. I need to alter the
>individual table one by one. Sometimes I may miss one or two. Is there
>a way to:
>1. check if a column exists in the all tables ( I don't want to desc a
>table at a time)
>2. alter all tables with the same table_name but different owner.
>
>Thanks
>K.C.

Check out ALL_TAB_COLUMNS

You should be able to write queries on it to do everything you want.

John
SQL> desc all_tab_columns

 Name                            Null?    Type
 ------------------------------- -------- ----
 OWNER                           NOT NULL VARCHAR2(30)
 TABLE_NAME                      NOT NULL VARCHAR2(30)
 COLUMN_NAME                     NOT NULL VARCHAR2(30)
 DATA_TYPE                                VARCHAR2(9)
 DATA_LENGTH                     NOT NULL NUMBER
 DATA_PRECISION                           NUMBER
 DATA_SCALE                               NUMBER
 NULLABLE                                 VARCHAR2(1)
 COLUMN_ID                       NOT NULL NUMBER
 DEFAULT_LENGTH                           NUMBER
 DATA_DEFAULT                             LONG
 NUM_DISTINCT                             NUMBER
 LOW_VALUE                                RAW(32)
 HIGH_VALUE                               RAW(32)
 DENSITY                                  NUMBER
 NUM_NULLS                                NUMBER
 NUM_BUCKETS                              NUMBER
 LAST_ANALYZED                            DATE
 SAMPLE_SIZE                              NUMBER
Received on Tue Nov 18 1997 - 00:00:00 CST

Original text of this message

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