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