This statement is an extension to the ANSI/ISO standard for SQL.
>>-DROP SYNONYM--+-----------+--synonym------------------------>< '- owner--.-'
Element | Description | Restrictions | Syntax |
---|---|---|---|
owner | Name of synonym owner | Must own the synonym | Owner Name |
synonym | Name of synonym to be dropped | The synonym and the table, view, or sequence object to which the synonym points must exist in the database | Identifier |
3This removes the entries for the 3synonym3 from the systables, syssynonyms, and syssyntable system catalog tables. You must 3own the synonym or have the DBA privilege to execute 3the DROP SYNONYM statement. Dropping a synonym has no effect on the table, 3view, or sequence object to which the synonym points.
The following statement drops the synonym nj_cust, which cathyg owns:
DROP SYNONYM cathyg.nj_cust
3DROP SYNONYM is not the only DDL operation that can unregister a synonym. If a table, view, or sequence is dropped, any synonyms that are in the same database and that refer to that table, view, or sequence object are also dropped.
If a synonym refers to an external table or view that is dropped, however, the synonym remains in place until you explicitly drop it using DROP SYNONYM. You can create another table, view, or synonym in place of the dropped table or view and give the new database object the name of the dropped table or view. The old synonym then refers to the new database object. For a complete discussion of synonym chaining, see the CREATE SYNONYM statement.
Related statement: CREATE SYNONYM
For a discussion of synonyms, see the IBM Informix Guide to SQL: Tutorial.