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

# ALTER FUNCTION

> The `ALTER FUNCTION` command modifies the definition of a function. To use this command, you must own the function.

## Syntax

```sql theme={null}
ALTER FUNCTION function( argument_type [, ...] )
    alter_option;
```

*`alter_option`* depends on the operation you want to perform on the function. For all supported clauses, see the sections below.

## Clause

### `SET SCHEMA`

```sql theme={null}
ALTER FUNCTION function( argument_type [, ...] )
    SET SCHEMA schema_name;
```

| Parameter or clause | Description |
| :- | :- |
| **SET SCHEMA** | This clause changes the schema of the function. To change a function's schema, you must also have CREATE privilege on the new schema. |
| *schema\_name* | Specify the schema to which you want to change. |

```sql theme={null}
-- Change the schema of the function named "test_func" to a schema named "test_schema"
ALTER FUNCTION test_func(INT) SET SCHEMA test_schema;
```


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