FairCom Corporation


2.17 DROP SYNONYM


Description

Drops the specified synonym.

Syntax

DROP [PUBLIC] SYNONYM [owner_name.]synonym ;

Arguments

PUBLIC
Specifies that the synonym was created with the PUBLIC argument.

SQL generates the Base table not found error if DROP SYNONYM specifies PUBLIC and the synonym was not a public synonym. Conversely, the same error message occurs if DROP SYNONYM does not specify public and the synonym was created with the PUBLIC argument.

To drop a public synonym, you must have the DBA privilege.

owner_name
If owner_name is specified and is different from the name of the user executing the statement, then the user must have DBA privileges.

synonym
Name for the synonym.

Example

DROP SYNONYM customer ;
DROP PUBLIC SYNONYM public_suppliers ;

Authorization

Users executing DROP SYNONYM must have either the DBA privilege or be the owner of the synonym. Users executing DROP PUBLIC SYNONYM must have the DBA privilege.

SQL Compliance
Extension
Environment
Embedded SQL, interactive SQL, ODBC applications
Related Statements
CREATE SYNONYM


FairCom Corporation
www.faircom.com