Drop Synonym Statement; Syntax Description Of Drop Synonym; Considerations; Versioning Considerations - HP Neoview SQL Reference Manual

Hide thumbs Also See for Neoview SQL:
Table of Contents

Advertisement

DROP SYNONYM Statement

"Syntax Description of DROP SYNONYM "

"Considerations"

"Versioning Considerations"

"Example of DROP SYNONYM"

The DROP SYNONYM statement allows you to drop synonyms for tables, views, or materialized
views that can be used in queries. You can write queries that reference the synonym and later
alter the synonym to point to a different object with the same structure. The advantage of this is
to change the object being referenced without changing the query.
When a synonym is assigned to an object, the object can be referenced either with the synonym
name or the actual name. The resultant query results will be the same.
Syntax Description of DROP SYNONYM
DROP SYNONYM alternate-name
alternate-name
specifies the name of the synonym. See
Considerations
When the object being referenced by the synonym is dropped, then the synonym is also
dropped.
Only the owner of the schema or the services ID can create, alter, or drop the alternate names.
You can create an unlimited number of synonyms for a single object.
Grant and Revoke commands are allowed on synonyms. The command will be applied to
the actual reference object.
When a synonym for an object is changed, any currently executing plans fail and required
name resolution and similarity check. If the similarity check fails, existing plans referencing
the new object associated with the synonym name require compilation or recompilation.
View, constraints, and trigger text cannot use synonym names in their DML text.
Synonyms cannot be renamed. The RENAME operation is allowed on actual table names
only.
Versioning Considerations
Synonyms are only available in schema version 2000. If you need to downgrade your schema to
version 1200, all synonyms must be dropped.
Example of DROP SYNONYM
This example drops a synonym:
DROP SYNONYM aname
"Database Object Names" (page
196).
DROP SYNONYM Statement
97

Advertisement

Table of Contents
loading

Table of Contents