> ## Documentation Index
> Fetch the complete documentation index at: /documents/llms.txt
> Use this file to discover all available pages before exploring further.

# DROP FUNCTION

> DROP FUNCTION deletes a custom function.

## 功能

删除一个自定义函数。函数的名称、参数类型完全一致才能够被删除。

要执行该命令的用户必须是函数的拥有者。

## 语法

```sql theme={null}
DROP [GLOBAL] FUNCTION <function_name>(arg_type [, ...])
```

## 参数说明

* `GLOBAL`：表示删除全局函数。数据库 从 3.0 版本开始支持创建 [Global UDF](/documents/cn/4.2/sql-reference/sql-functions/JAVA_UDF.md)。
* `function_name`: 待删除函数的名字，必填。
* `arg_type`: 待删除函数的参数类型，必填。

## 示例

删除一个函数。

```sql theme={null}
DROP FUNCTION my_add(INT, INT)
```

## 相关 SQL

* [SHOW FUNCTIONS](/documents/cn/4.2/sql-reference/sql-statements/Function/SHOW_FUNCTIONS.md)
* [Java UDF](/documents/cn/4.2/sql-reference/sql-functions/JAVA_UDF.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.