doc-exports/docs/dws/dev/dws_06_0193.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

6.5 KiB

DROP FUNCTION

Function

DROP FUNCTION deletes an existing function.

Precautions

If a function involves operations on temporary tables, the function cannot be deleted by running DROP FUNCTION.

Syntax

1
2
DROP FUNCTION [ IF EXISTS ] function_name 
[ ( [ {[ argmode ] [ argname ] argtype} [, ...] ] ) [ CASCADE | RESTRICT ] ];

Parameter Description

  • IF EXISTS

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

  • function_name

    Specifies the name of the function to be deleted.

    Value range: An existing function name.

  • argmode

    Specifies the mode of a function parameter.

  • argname

    Specifies the name of a function parameter.

  • argtype

    Specifies the data types of a function parameter.

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

Examples

Delete a function named add_two_number.

1
DROP FUNCTION add_two_number;