Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Same name for two tables
On Wed, 23 Jun 1999 14:50:34 +0200, "Fred Ruffet"
<fruffet_at_kaptech.com> wrote:
>I work on an Oracle 7.3.4 database. It happens that I have to tables in this
>database, that have the same name. I don't know how they were created, but
>in the sys table sys.obj$, they are distinct objects. The second one has
>never been modified (ctime=mtime), because, I believe, every modification
>has been done on the first one.
>How could I get rid of the second one ? Do I only have to delete its
>occurence from sys.obj$ ?
>Is it an Oracle bug ?
Do
select * from dba_objects where object_name = '<TABLE NAME>';
substitute <TABLE NAME> with capitalized name of the table. This will tell you the owner of two tables. It is impossible to have a table with the same name in the same schema.
To get rid of (drop) the table you have to log in as either the one with DBA privilege (e.g. system) or the owner of the table and do
drop table <owner>.<table name>;
k. Received on Thu Jun 24 1999 - 11:27:16 CDT