> ## Documentation Index
> Fetch the complete documentation index at: https://risingwavelabs-wyx-add-timestamp-dedicated-page.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# ALTER CONNECTION

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

## Syntax

```sql theme={null}
ALTER CONNECTION connection_name
    alter_option;
```

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

## Clause

### `SET SCHEMA`

```sql theme={null}
ALTER CONNECTION connection_name
    SET SCHEMA schema_name;
```

| Parameter or clause | Description                                                                                                                               |
| :------------------ | :---------------------------------------------------------------------------------------------------------------------------------------- |
| **SET SCHEMA**      | This clause changes the schema of the connection. To change a connection'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 connection named "test_conn" to a schema named "test_schema"
ALTER CONNECTION test_conn SET SCHEMA test_schema;
```
