Start of changeStart of change

-750   THE SOURCE TABLE table-name CANNOT BE RENAMED OR ALTERED BECAUSE IT IS REFERENCED IN AN EXISTING VIEW, MATERIALIZED QUERY TABLE, OR IS A CLONE TABLE, OR HAS A CLONE TABLE DEFINED FOR IT.

Explanation

An attempt was made to rename or alter a table, but the table could not be renamed or altered.

table-name
The name of the table.

Possible reasons for this error include, but are not limited to:

General cases
  • The column is referenced in one or more view definitions.
  • The column is referenced in one or more materialized table definitions.
  • The column has a check constraint or field procedure defined on it.
  • The column has an expression-based index defined on it.
  • The column is referenced in a user-defined SQL table function.
  • The table has a valid procedure or edit procedure defined on it.
  • The table is a clone table.
  • The table has a clone table defined for it.
  • The table has a synonym defined for it.
  • The table is defined as an active resource limit table.
  • The table is a system-period temporal table.
  • The table is a history table.
ALTER TABLE statements
  • In an ALTER TABLE statement, a column in the indicated table cannot be renamed for one of the following reasons:
    • The column is referenced in one or more view definitions.
    • The column is referenced in a check constraint.
    • The column has a field procedure defined.
    • The trigger is defined on the table.
    • The table has a valid procedure or an edit procedure that is defined with row attribute sensitivity.
    • An index is defined on the table with an expression that references the column.
    • The definition of one or more materialized query tables references the table.
    • The table is a system period temporal table or a history table.
  • For an ALTER TABLE statement that names a materialized query table, the alterations are limited to the following situations:
    • Changing the materialized query table attributes.
    • Turning the materialized query table to a base table.
    • Specifying the following clauses:
      • ADD RESTRICT ON DROP
      • ALTER MATERIALIZED QUERY
      • AUDIT
      • DATA CAPTURE
      • DROP MATERIALIZED QUERY
      • DROP RESTRICT ON DROP

      ADD RESTRICT ON DROP and DROP RESTRICT ON DROP clauses cannot be used in the same statement.

  • The length of a column in the indicated table cannot be altered because the table is referenced by a materialized query table definition.
  • The ALTER TABLE statement was executed using the ALTER COLUMN clause, and names a table which is referenced by a materialized table query.
  • The ALTER TABLE statement was executed using the ALTER COLUMN clause, but columns are referenced by a view that is referenced by materialized table query.
  • The ALTER TABLE statement was executed using the SET DEFAULT clause, and names a table which is referenced by a materialized table query or view.
ALTER VIEW statements
  • An ALTER VIEW REGENERATE statement was executed, but the specified view is referenced by a materialized table.
RENAME TABLE statements
  • A RENAME statement specifies a materialized query table (MQT). Materialized query tables cannot be renamed.
  • The table is a system period temporal table or a history table.
  • The table is an accelerator-only table.

System action

The statement cannot be processed.

Programmer response

Change the source name to the name of an object that can be renamed or altered, and reissue the statement.

Drop any triggers defined on the table before issuing the RENAME statement. To find these triggers, query the system catalog.

Drop any view that reference the table before issuing the RENAME statement. To find these views, query the system catalog.

If there is a clone defined on the table, drop the clone table before issuing the RENAME statement.

SQLSTATE

42986

End of changeEnd of change