1
0
forked from docs/doc-exports
doc-exports/docs/dws/dev/dws_06_0207.html
Lu, Huayi a24ca60074 DWS DEVELOPER 811 version
Reviewed-by: Hasko, Vladimir <vladimir.hasko@t-systems.com>
Co-authored-by: Lu, Huayi <luhuayi@huawei.com>
Co-committed-by: Lu, Huayi <luhuayi@huawei.com>
2023-01-19 13:37:49 +00:00

4.9 KiB

DROP SYNONYM

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

1
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

Delete a synonym.

1
2
DROP SYNONYM t1;
DROP SCHEMA ot CASCADE;

Helpful Links

ALTER SYNONYM and CREATE SYNONYM