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

Hide thumbs Also See for Neoview SQL:
Table of Contents

Advertisement

ALTER SYNONYM Statement

"Syntax Description of ALTER SYNONYM "

"Considerations"

"Versioning Considerations"

"Example of ALTER SYNONYM"

The ALTER SYNONYM statement allows you to change the table, view, or materialized view
the synonym is referencing to a different object of the same structure. You can write queries that
reference the synonym and use the ALTER SYNONYM command 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 ALTER SYNONYM
ALTER SYNONYM alternate-name TO object;
alternate-name
specifies the name of the synonym. See
object
specifies Neoview SQL tables, views, and materialized views. See
(page
196).
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
for a table.
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.
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 ALTER SYNONYM
This example changes a synonym:
ALTER SYNONYM aname TO s-table
46
SQL Statements
"Database Object Names" (page
196).
"Database Object Names"

Advertisement

Table of Contents
loading

Table of Contents