Nonstop Database, HiRDB Version 9 System Operation Guide

[Contents][Index][Back][Next]

13.9 Changing a table name or column name

Executor: Table owner

You modify a table name or column name by executing ALTER TABLE with the RENAME operand specified.

Note
  1. The table name or column name of a falsification prevented table cannot be changed.
  2. Changing a table name or column name invalidates any stored routines that use that table. If this happens, use the ALTER PROCEDURE or ALTER ROUTINE statement to re-create each stored routine.
  3. Changing a table name or column name of a table specified in a trigger SQL statement invalidates the trigger. If this happens, use the ALTER TRIGGER or ALTER ROUTINE statement to re-create the trigger.
  4. The table name of a table that defines a trigger cannot be changed.
  5. The column names of the following columns cannot be changed in a table that defines a trigger:
    [Figure] Trigger event column
    [Figure] Column that is referenced by a trigger action condition using an old and new values correlation name
    [Figure] Column that is referenced by a trigger SQL statement using an old and new values correlation name
Organization of this section
13.9.1 Example 1: Changing a table name
13.9.2 Example 2: Changing a column name