Tuesday, November 15, 2011

Renaming Table in Oracle

SQL> rename old_table to new_table_name;

Table renamed.

Use the RENAME statement to rename a table, view, sequence, or private synonym.
  • Oracle Database automatically transfers integrity constraints, indexes, and grants on the old object to the new object.
  • Oracle Database invalidates all objects that depend on the renamed object, such as views, synonyms, and stored procedures and functions that refer to a renamed table.

No comments:

Post a Comment