DROP SYNONYM
DROP SYNONYM#
Syntax#
drop_synonym ::=#
Prerequisites#
Only the SYS user, the owner of the schema containing the , and the users with the DROP ANY SYNONYM privilege can execute the DROP SYNONYM statement.
In addition, only the SYS user and users with the DROP PUBLIC SYNONYM system privilege can drop public synonyms.
Description#
This statement is used to remove a synonym from the database.
PUBLIC#
To remove a public synonym, use the PUBLIC keyword, If the PUBLIC keyword is not used, a PRIVATE synonym having the specified name will be removed.
When the PUBLIC keyword is used, user_name cannot be specified.
user_name#
This is used to specify the name of the owner of the synonym to drop. If omitted, Altibase will assume that the synonym belongs to the schema of the user connected via the current session.
synonym_name#
This is used to specify the name of the synonym to drop.
Examples#
<Query> Drop the synonym my_dept.
iSQL> DROP SYNONYM my_dept;
Drop success.
<Query> Drop the PUBLIC synonym dept.
iSQL> DROP PUBLIC SYNONYM dept;
Drop success.