---
schema_version: "1"
id: 61622b5a23bd800048c225961cff43f72c1985833d6b1a766373493efe1de916
title: CREATE SCHEMA
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/data-cloud/data-cloud-query-guide/references/data-cloud-sql-reference/tableau-sql-commands/create-schema.md
canonical_url: https://developer.salesforce.com/docs/data/data-cloud-query-guide/references/dc-sql-reference/create-schema.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: 5b76c5c26ab155ec2e7fa7aa6877c31085f3efb28f5106e45870a9335c90662f
products:
  - Data 360 Query Guide
  - Data 360 Developer Documentation
---
# CREATE SCHEMA

**Applies to:** ❌ Data 360 SQL ✅ Tableau Hyper API

Define a new schema.

## Syntax

```sql
CREATE SCHEMA [IF NOT EXISTS] <schema_name>
```

## Description

`CREATE SCHEMA` enters a new schema into the current database. The
schema name must be distinct from the name of any existing schema in the
current database.

A schema is essentially a namespace: it contains named objects (tables,
data types, functions, and operators) whose names can duplicate those of
other objects existing in other schemas. Named objects are accessed
either by "qualifying" their names with the schema name as a prefix, or
by setting a search path that includes the desired schema(s). A `CREATE`
command specifying an unqualified object name creates the object in the
current schema (the one at the front of the search path, which can be
determined with the function `current_schema`).

## Parameters

- `<schema_name>`

  - : The name of a schema to be created. If this is omitted, the
    `<user_name>` is used as the schema name.

- `IF NOT EXISTS`

  - : Do nothing if a schema with the same name already exists.

## Examples

Create a schema:

```sql
    CREATE SCHEMA myschema;
```

## Compatibility

The `IF NOT EXISTS` option is a Hyper extension.
