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 name for two tables

Re: Same name for two tables

From: Fred Ruffet <fruffet_at_kaptech.com>
Date: Fri, 25 Jun 1999 09:33:44 +0200
Message-ID: <7kvbd7$mme$1@gatekeeper.ornano.kapt.com>


So, it's not an Oracle problem !!! when I run the select you told me, here is what I obtain :

SQL> select * from dba_objects where object_name = 'COMPTE'; OWNER



OBJECT_NAME


OBJECT_ID OBJECT_TYPE CREATED LAST_DDL --------- ------------- -------- -------- TIMESTAMP
STATUS


GESTECH
COMPTE
     5024 TABLE 15/09/98 21/01/99 1999-01-21:10:42:47
VALID
GESTECH
COMPTE
     5025 INDEX 15/09/98 15/09/98 1998-09-15:18:18:22
VALID So, one is a table, the other an index. It seems good, except that the program I use (Borland Database Explorer) shows me two tables named COMPTE, each one with an INDEX named COMPTE... How should I consider this ?

Frédéric Ruffet - fruffet_at_kaptech.com
"Rest is silence" - W. Shakespeare

Kirill Richine a écrit dans le message
<37725aa3.266292578_at_news.cadvision.com>...
>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 Fri Jun 25 1999 - 02:33:44 CDT

Original text of this message

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