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: Sylvain <sylvain_at_sdv.fr>
Date: 1997/11/18
Message-ID: <01bcf442$4d1b87c0$2e6346c0@optimum.sdv.fr>#1/1

 You may use views for that... create a table with current fields, add an "owner" field, fill it with current user that you are copying. Then create a view using this table joining "owner" to 'user' and give a public synonym on it.... easy!

 If this doesn't help (insert problems and all...), PL/SQL is here. The table you are looking for is "DBA_COL_COMMENTS".

SQL> desc dba_col_comments

 Name                            Null?    Type
 ------------------------------- -------- ----
 OWNER                           NOT NULL VARCHAR2(30)
 TABLE_NAME                      NOT NULL VARCHAR2(30)
 COLUMN_NAME                     NOT NULL VARCHAR2(30)
 COMMENTS                                 VARCHAR2(2000)

 For your problem of "alter", you could write a PL/SQL script that build a SQL script to alter "user.table_name"....

  hope it helps!

Kenneth Yeung <kenneth_at_wetwetwet.com> a écrit dans l'article <34701BBF.BB673324_at_wetwetwet.com>...
> 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.
Received on Tue Nov 18 1997 - 00:00:00 CST

Original text of this message

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