apache > db
Apache DB Project
 
Font size:      

RENAME Statements

RENAME INDEX statement

This statement allows you to rename an index in the current schema. Users cannot rename indexes in the SYS schema.

Syntax

RENAME INDEX index-Name TO new-index-Name

Examples

RENAME INDEX DESTINDEX TO ARRIVALINDEX

Statement Dependency System

RENAME INDEX is not allowed if there are any open cursors that reference the index being renamed.

RENAME TABLE statement

RENAME TABLE allows you to rename an existing table in any schema (except the schema SYS).

Syntax

RENAME TABLE table-Name TO new-table-Name

If there is a view or foreign key that references the table, attempts to rename it will generate an error. In addition, if there are any check constraints or triggers on the table, attempts to rename it will also generate an error.

Examples

RENAME TABLE SAMP.EMP_ACT TO EMPLOYEE_ACT

Also see ALTER TABLE for more information.

Statement Dependency System

If there is an index defined on the table, the table can be renamed.

RENAME TABLE is not allowed if there are any open cursors that reference the table being altered.


Previous Page
Next Page
Table of Contents
Index