Home » SQL & PL/SQL » SQL & PL/SQL » create unique index
create unique index [message #271711] Tue, 02 October 2007 11:06 Go to next message
caprikar
Messages: 226
Registered: March 2007
Senior Member
Hi,
I'm trying to create a unique index but its failing with:
ORA-00955: name is already used by an existing object

But when i query:
SQL> SELECT INDEX_NAME,TABLE_OWNER,TABLE_NAME,UNIQUENESS FROM USER_INDEXES WHERE TABLE_NAME='COUNT_REF';

it returns with no rows selected.

Can some one through some light what could be the issue?
Thanks,
GK
Re: create unique index [message #271715 is a reply to message #271711] Tue, 02 October 2007 11:15 Go to previous messageGo to next message
Michel Cadot
Messages: 64102
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
"Object" does not mean "index", there are many types of object.
Query user_objects.

Regards
Michel
Re: create unique index [message #271731 is a reply to message #271715] Tue, 02 October 2007 13:03 Go to previous messageGo to next message
MarcL
Messages: 455
Registered: November 2006
Location: Connecticut, USA
Senior Member
Michel Cadot wrote on Tue, 02 October 2007 11:15
"Object" does not mean "index", there are many types of object.




Which is why it's generally a good practice to suffix your objects. _IDX for index _SEQ for Sequence _V for view _PRC for Procedure etc etc.
Re: create unique index [message #271735 is a reply to message #271711] Tue, 02 October 2007 13:16 Go to previous message
Bill B
Messages: 1482
Registered: December 2004
Senior Member
select object_type 
from user_objects
where object_name='COUNT_REF';


Personally I user _U1 for unique indexes, _I1 for indexes, _PK for primary key, _V for views and _S for sequences.
Previous Topic: How to start?
Next Topic: Parsing CSV file into external tables
Goto Forum:
  


Current Time: Fri Dec 02 20:57:58 CST 2016

Total time taken to generate the page: 0.10139 seconds