Nonstop Database, HiRDB Version 9 System Operation Guide

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

13.7 Deleting a column

Executor: HiRDB administrator and table owner

You delete a column from a table by executing ALTER TABLE with the DROP operand specified.

Notes
  1. A column of a table in which data is stored cannot be deleted.
  2. A column for which a cluster key is defined cannot be deleted.
  3. A LOB column cannot be deleted.
  4. If an abstract data type is defined for a table, none of the columns in that table can be deleted.
  5. Columns cannot be deleted from falsification prevented tables.
  6. Deleting a column from a table 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.
  7. Deleting a column from a table specified in a trigger SQL statement invalidates the trigger. In addition, deleting a column that is accessed by the trigger action condition or from within an SQL statement using an old and new values correlation name invalidates the trigger. If this happens, use the ALTER TRIGGER or ALTER ROUTINE statement to re-create the trigger.
  8. After the column has been deleted from the table, execute the optimizing information collection utility (pdgetcst command) if necessary. For details about whether execution of the optimizing information collection utility is required, see the manual HiRDB Version 9 Command Reference.
Organization of this section
13.7.1 Example: Deleting a column