> ## 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.

# CREATE SCHEMA

> Use the `CREATE SCHEMA` command to create a new schema.

## Syntax

```sql theme={null}
CREATE SCHEMA [IF NOT EXISTS] [database_name.]schema_name [AUTHORIZATION user_name];

CREATE SCHEMA [ IF NOT EXISTS ] AUTHORIZATION user_name;
```

## Parameters

| Parameter or clause      | Description                                                                                                                          |
| :----------------------- | :----------------------------------------------------------------------------------------------------------------------------------- |
| *schema\_name*           | The name of the schema to be created.                                                                                                |
| **IF NOT EXISTS** clause | Creates a schema if the schema name has not already been used. Otherwise throws an error.                                            |
| *database\_name*         | The name of the database for the schema to be created in. If not specified, the schema will be created in the default database dev.  |
| **AUTHORIZATION** clause | Specifies the owner or authorized user of the schema. If the *schema\_name* is omitted, the *user\_name* is used as the schema name. |
| *user\_name*             | Specifies the username of the owner or authorized user of the schema.                                                                |

## Examples

```sql theme={null}
CREATE SCHEMA IF NOT EXISTS schema_1;
```

<Note>
  Names and unquoted identifiers are case-insensitive. Therefore, you must double-quote any of these fields for them to be case-sensitive. See also [Identifiers](/sql/identifiers).
</Note>

```sql Examples of AUTHORIZATION clause theme={null}

-- Create a new schema for the user 'joe'. As the schema name is omitted, the schema name is default to the user name 'joe'.
CREATE SCHEMA IF NOT EXISTS AUTHORIZATION joe;

----RESULT
CREATE_SCHEMA

-- Create a new schema named 'new_schema', and assign 'joe' as the owner.
CREATE SCHEMA IF NOT EXISTS new_schema AUTHORIZATION joe;

----RESULT
CREATE_SCHEMA

-- Display the existing schemas. You will see 'joe' and 'new_schema'.
SHOW SCHEMAS;

----RESULT
        Name
--------------------
 information_schema
 public
 pg_catalog
 joe
 new_schema
 rw_catalog
(6 rows)
```
