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

Home -> Community -> Mailing Lists -> Oracle-L -> RE: rename indexes

RE: rename indexes

From: Vikas Kawatra <VKawatra_at_innoventry.com>
Date: Fri, 04 May 2001 12:17:30 -0700
Message-ID: <F001.002F9BA1.20010504110026@fatcity.com>

Here's an example of a CREATE TABLE where you can define the names of Primary key.Unique key or Check Constraints - so that the indexes are not Oracle defaults - but what you specify !! Also,you can use the following to rename index names

ALTER INDEX <index name> RENAME TO <new index name> ;

vikas

CREATE TABLE CCAS.CCAS_PAYOR (
  LAST_UPDATED_BY VARCHAR2(35),
  LAST_UPDATED_DATE DATE,

  FEDERAL_ID         VARCHAR2(20), 
  FIRST_TRANS        DATE, 

  LAST_CASHED_TRANS DATE,
  CONSTRAINT CCAS_CCPYR_START_END_C1
    CHECK ( START_DATE <= END_DATE ) , 
  CONSTRAINT CCAS_CCPYR_ROUTE_ACCOUNT_U1
    UNIQUE (ROUTE, ACCOUNT)    USING INDEX 
     TABLESPACE CCPYR_INDX PCTFREE 10, 

  CONSTRAINT CCAS_CCPYR_PAYORID_PK
  PRIMARY KEY ( PAYOR_ID )
    USING INDEX
     TABLESPACE CCPYR_INDX PCTFREE 10)
 TABLESPACE CCPYR_DATA
   PCTFREE 10 PCTUSED 40
   INITRANS 1 MAXTRANS 255
 STORAGE ( FREELISTS 5 )
   NOCACHE; -----Original Message-----
Sent: Friday, May 04, 2001 8:12 AM
To: Multiple recipients of list ORACLE-L

When I create tables with primary keys, Oracle gives the indexes a default name.

Can I rename these indexes with meaningful names, or do I need to drop and recreate my tables, amending create table statements to explicitly name the indexes?

John

--

Please see the official ORACLE-L FAQ: http://www.orafaq.com
--

Author: John Dunn
  INET: john.dunn_at_sefas.co.uk

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing).
--

Please see the official ORACLE-L FAQ: http://www.orafaq.com
--

Author: Vikas Kawatra
  INET: VKawatra_at_innoventry.com
Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing). Received on Fri May 04 2001 - 14:17:30 CDT

Original text of this message

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