Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Can I rename an index?

Re: Can I rename an index?

From: Syltrem <syltrem_at_videotron.ca>
Date: Wed, 14 Feb 2001 15:42:48 -0500
Message-ID: <Y0Ci6.8876$QB4.170450@wagner.videotron.net>

INDEED. SQL command syntax is sometimes confusing. You have a RENAME command that only works for tables so I figured there was nothing for indexes. ALTER TABLE RENAME is there, too so we've got 2 ways to rename a table (just trying to apologize for asking questions that appear to be of RTFM nature).

Thanks!
Next time I will do more research on possible ways to ask something to SQL*Plus.

--

Sytrem
http://pages.infinit.net/syltrem

"Jonathan Lewis" <jonathan_at_jlcomp.demon.co.uk> a écrit dans le message news:
982181774.29482.0.nnrp-01.9e984b29_at_news.demon.co.uk...

>
> Alter index sys_c00400 rename to my_pk;
>
>
> --
> Jonathan Lewis
> Yet another Oracle-related web site: http://www.jlcomp.demon.co.uk
>
> Practical Oracle 8i: Building Efficient Databases
> Publishers: Addison-Wesley
>
> Reviews at: http://www.jlcomp.demon.co.uk/book_rev.html
>
>
>
> Syltrem wrote in message ...
> >I would like to rename an index but the RENAME command is only for
tables...
> >Tried to drop it and recreate it, but could not do this either...
> >
> >SQL> DROP INDEX SYS_C0083054
> > 2 ;
> >DROP INDEX SYS_C0083054
> >*
> >ERROR at line 1:
> >ORA-02429: cannot drop index used for enforcement of unique/primary key
> >
>
>---------------------------------------------------------------------------
> -
> >02429, 00000, cannot drop index used for enforcement of unique/primary
key
> >
> >// *Cause: user attempted to drop an index that is being used as the
> >// enforcement mechanism for unique or primary key.
> >// *Action: drop the constraint instead of the index.
>
>---------------------------------------------------------------------------
> -
> >
> >Now how do I drop a constraint?
> >
> >Thanks!
> >
> >--
> >
> >Sytrem
> >http://pages.infinit.net/syltrem
> >
> >
> >
>
>
Received on Wed Feb 14 2001 - 14:42:48 CST

Original text of this message

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