Start of change

-20525   THE REQUESTED ACTION IS NOT VALID FOR TABLE table-name BECAUSE THE TABLE IS THE WRONG TYPE OF TABLE. REASON CODE = reason-code

Explanation

The table cannot be used as specified.

table-name
The name of the table.
reason-code
The reason for the message or SQL code, indicated by one of the following values:
1
An ALTER TABLE statement with an ADD PERIOD clause was specified for a history table. A period cannot be specified for a history table.
4
An ALTER TABLE statement with a DROP VERSIONING clause was specified, but the table is not a system-period temporal table.
5
An ALTER TABLE statement with a DROP VERSIONING clause was specified. However, system-period data versioning cannot be dropped if there are any triggers, functions, procedures, views, or materialized query tables that reference historical versions of rows in the table.
7
An ALTER TABLE statement with a ROTATE PARTITION clause was specified for a system-period temporal table or a history table.
8
An ALTER TABLE statement with an ADD CLONE clause was specified for a system-period temporal table or a history table.
9
A TRUNCATE statement attempted to truncate a system-period temporal table. A system-period temporal table cannot be truncated.
10
An ALTER TABLESPACE statement attempted to alter the CCSID of a table space that contains a system-period temporal table or a history table.
11
A CREATE TABLE or ALTER TABLE statement attempted to define a referential constraint where either the parent or child table is a history table.
13
An ALTER TABLE statement with an ADD COLUMN clause was specified for a history table.
16
An ALTER TABLE statement was specified to add a generated column other than a ROWID to a system-period temporal table.

System action

The statement cannot be processed.

User response

Change the statement to specify the name of a table for which the action is valid, or specify a different action for the current table.

SQLSTATE

428HZ

End of change