Start of changeStart of change

-766   THE OBJECT OF A STATEMENT IS A TABLE FOR WHICH THE REQUESTED OPERATION IS NOT PERMITTED

Explanation

The requested operation is not valid for the table that was specified in the SQL statement.

This error can occur when the statement violates one of the following requirements, depending on the type of table:

Accelerator-only table
An accelerator-only table must not be specified in any of the following statements:
  • A CREATE SYNONYM statement to define a synonym.
  • A CREATE TRIGGER statement to define a trigger for the accelerator-only table.
  • A LOCK TABLE statement.
  • A CREATE INDEX statement.
Auxiliary table
An auxiliary table for a LOB column must not be specified as the target of the following statements:
  • ALTER TABLE
  • CREATE ALIAS
  • CREATE FUNCTION
  • CREATE SYNONYM
  • CREATE VIEW
  • DELETE
  • DESCRIBE TABLE
  • INSERT
  • MERGE
  • SELECT
  • TRUNCATE
  • UPDATE

Attributes of an auxiliary table cannot be altered. However, the APPEND attributes of auxiliary tables can be altered.

Aliases and synonyms cannot be created on an auxiliary table.

Data in an auxiliary table cannot be accessed by specifying the auxiliary table name in the SELECT, INSERT, DELETE, UPDATE, MERGE, CREATE PROCEDURE, or CREATE FUNCTION statement. Data in an auxiliary table can be accessed only through operations on the base table columns.

CLUSTER cannot be specified on an ALTER TABLE statement if the table is an auxiliary table.

Implicitly created table for an XML column
An implicitly created table for an XML column must not be specified as the target of the following statements:
  • ALTER TABLE
  • CREATE ALIAS
  • CREATE FUNCTION
  • CREATE INDEX
  • CREATE SYNONYM
  • CREATE TRIGGER
  • CREATE VIEW
  • DELETE
  • DESCRIBE TABLE
  • INSERT
  • MERGE
  • REVOKE
  • SELECT
  • TRUNCATE
  • UPDATE
Table with system-period data versioning
A table with system-period data versioning must be the only table in the table space, and it must not be any of the following types of tables:
  • An incomplete table
  • An auxiliary table
  • A clone table or a table with a clone defined on it
  • A table that was implicitly created for an XML column
  • A table that contains a security label column

A security label column cannot be added to a system-period temporal table.

System action

The statement cannot be processed.

Programmer response

Correct the statement to specify the corresponding base table instead of the specified table, and resubmit the statement.

SQLSTATE

560A4

End of changeEnd of change