Hitachi

Hitachi Advanced Database Setup and Operation Guide


11.1.3 Changing the column name of a base table

To change the column name of a base table, execute the ALTER TABLE definition SQL statement.

The HADB user who defined the base table can use the ALTER TABLE statement to change the column name.

The following shows a specification example of changing the column name of a base table.

Specification example

The name of the EMAIL_ADDRESS column of the shop table (SHOPSLIST) is changed to EMAIL.

ALTER TABLE "SHOPSLIST"
    RENAME COLUMN FROM "EMAIL_ADDRESS" TO "EMAIL"

[Figure]

For details about the specification format and rules for the ALTER TABLE statement, see ALTER TABLE (alter table definition) in the manual HADB SQL Reference.

Note that changing the column name of a base table might result in the following adverse affects. Check whether there is any adverse effect.

You cannot use the ALTER TABLE statement to rename a column of the base table in the following situations: