Oracle9i New Feature Series: Rename Column
Oracle databases Oracle9i Release 2 and higher now allow
you to rename a column in the table.
ALTER TABLE table_name
RENAME COLUMN old_name TO new_name
RENAME COLUMN clause of ALTER TABLE to
rename a column. The new column name must not be the same as any other column
Function-based indexes and check constraints that depend on
the renamed column remain valid.
Dependent views, triggers, domain indexes, functions,
procedures, and packages are marked
INVALID. Oracle attempts
to revalidate them when they are next accessed, but you may need to alter these
objects with the new column name if revalidation fails.
You cannot combine this clause with any of the other
cannot rename a column that is used to define a join index. Instead you must
drop the index, rename the column, and re-create the index.
in the same statement.
Biju Thomas is Oracle7.3 OCP, Oracle8 OCP,
Oracle8i OCP and Oracle9i OCA/OCP Certified DBA
Questions/Comments? Write to firstname.lastname@example.org.
© The scripts, tips and articles appearing on BijooS.com cannot be reproduced
elsewhere without the prior permission from the webmaster.