Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: same table_name with different owners
>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 NUMBERReceived on Tue Nov 18 1997 - 00:00:00 CST
![]() |
![]() |