doc-exports/docs/dws/dev/dws_06_0205.html
Lu, Huayi ef0ada5a59 DWS DEV 20240716 version
Reviewed-by: Pruthi, Vineet <vineet.pruthi@t-systems.com>
Co-authored-by: Lu, Huayi <luhuayi@huawei.com>
Co-committed-by: Lu, Huayi <luhuayi@huawei.com>
2024-11-02 09:07:47 +00:00

4.8 KiB

DROP SEQUENCE

Function

DROP SEQUENCE deletes a sequence from the current database.

Precautions

Only a sequence owner or a system administrator can delete a sequence.

Syntax

1
DROP SEQUENCE [ IF EXISTS ] {[schema.]sequence_name} [ , ... ] [ CASCADE | RESTRICT ];

Parameter Description

  • IF EXISTS

    Sends a notice instead of an error if the specified sequence does not exist.

  • name

    Specifies the name of the sequence.

  • CASCADE

    Automatically deletes objects that depend on the sequence to be deleted.

  • RESTRICT

    Refuses to delete the sequence if any objects depend on it. This is the default.

Examples

Delete the sequence serial:

1
DROP SEQUENCE serial;