Synonym usage
The use of synonyms is restricted. This capability does not apply to the Entry plan of the Db2® Warehouse on Cloud managed service.
You cannot issue the following statements
with a table synonym as the target:
- ALTER TABLE
- DROP TABLE
- RENAME TABLE
- TRUNCATE
You cannot issue the following statements with a view
synonym as the target:
- ALTER VIEW
- DROP VIEW
You cannot issue the following statements with a sequence
synonym as the target:
- ALTER SEQUENCE
- DROP SEQUENCE
Examples
The following DROP statement for a table synonym returns
an error:
CREATE TABLE T (C1 INT)
CREATE SYNONYM S FOR TABLE T
DROP TABLE S