Help Center > > Developer Guide> SQL Reference> SQL Syntax> DROP SYNONYM

DROP SYNONYM

Updated at: Jul 15, 2020 GMT+08:00

Function

DROP SYNONYM is used to delete a synonym object.

Precautions

Only a synonym owner or a system administrator can run the DROP SYNONYM command.

Syntax

DROP SYNONYM [ IF EXISTS ] synonym_name [ CASCADE | RESTRICT ];

Parameter Description

  • IF EXISTS

    Send a notice instead of reporting an error if the specified synonym does not exist.

  • synonym_name

    Name of a synonym (optionally with schema names)

  • CASCADE | RESTRICT
    • CASCADE: automatically deletes objects (such as views) that depend on the synonym to be deleted.
    • RESTRICT: refuses to delete the synonym if any objects depend on it. This is the default.

Examples

For details about CREATE YNONYM, see Examples.

Helpful Links

ALTER SYNONYM and CREATE SYNONYM

Did you find this page helpful?

Submit successfully!

Thank you for your feedback. Your feedback helps make our documentation better.

Failed to submit the feedback. Please try again later.

Which of the following issues have you encountered?







Please complete at least one feedback item.

Content most length 200 character

Content is empty.

OK Cancel