# DROP FUNCTION

## Synopsis <a href="#synopsis" id="synopsis"></a>

```sql
DROP FUNCTION function_name (arg_name arg_type [, ...]);
```

## Description

Drops an existing user-defined function. The function's name and its list of arguments (as specified when the function was created using the [CREATE FUNCTION](/reference/sql-syntax/ddl/create-function.md) statement) should be provided for identifying the function. Only the function owner can execute this statement.

{% hint style="warning" %}
**Important** `DROP FUNCTION` cannot be undone. Use it with care!
{% endhint %}

Functions display only if the current [Access Control](/overview/core-concepts/access-control.md#role) has `USAGE` privileges on them.

### Arguments

#### function\_name

The name of the function to drop. If the name is case-sensitive, you must wrap it in double quotes; otherwise, the system uses the lower case name.

#### (arg\_name arg\_type \[,…​])

An ordered list of function argument names and types.

## Example

#### Drop a function

Assume a user-defined function, named `touppercase`, is created using the [CREATE FUNCTION](/reference/sql-syntax/ddl/create-function.md) statement and is now available:

```sh
db1.public/my_store# CREATE FUNCTION toUpperCase (s VARCHAR) RETURNS VARCHAR LANGUAGE JAVA WITH ('source.name' = 'mysrc', 'class.name' = 'util.UpperCase');
+------------+-------------+------------+------------------------------------------+
|  Type      |  Name       |  Command   |  Summary                                 |
+============+=============+============+==========================================+
| function   | touppercase | CREATE     | function touppercase was successfully    |
|            |             |            | created                                  |
+------------+-------------+------------+------------------------------------------+
```

You can drop this function with the below statement:

```sh
db1.public/my_store# SHOW FUNCTIONS;
+--------------------------------+-------+--------------+----------------+--------------------+------------+-------------+-------------------------------+-------------------------------+
|  Signature                     |  Type |  Source Name |  Class Name    |  Egress Allow URIs |  Owner     |  Properties |  Created At                   |  Updated At                   |
+================================+=======+==============+================+====================+============+=============+===============================+===============================+
| touppercase(s VARCHAR) VARCHAR | udf   | functions    | util.UpperCase |                    | sysadmin   | {}          | 2024-07-02 22:25:20 +0000 UTC | 2024-07-02 22:25:20 +0000 UTC |
+--------------------------------+-------+--------------+----------------+--------------------+------------+-------------+-------------------------------+-------------------------------+
db1.public/my_store# DROP FUNCTION toUpperCase (s VARCHAR);
+------------+-------------+------------+---------------------------------------+
|  Type      |  Name       |  Command   |  Summary                              |
+============+=============+============+=======================================+
| function   | touppercase | DROP       | function touppercase has been deleted |
+------------+-------------+------------+---------------------------------------+
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.deltastream.io/reference/sql-syntax/ddl/drop-function.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
