---
title: CREATE SHARE
description: Create a Delta Sharing share with CREATE SHARE in Databricks SQL and Databricks Runtime.
canonical_url: https://docs.databricks.com/aws/en/sql/language-manual/sql-ref-syntax-ddl-create-share
---

# CREATE SHARE

**Applies to:** ![check marked yes](https://docs.databricks.com/aws/en/images/icons/check.png) Databricks SQL ![check marked yes](https://docs.databricks.com/aws/en/images/icons/check.png) Databricks Runtime 10.4 LTS and above ![check marked yes](https://docs.databricks.com/aws/en/images/icons/check.png) Unity Catalog only

Creates a share with the specified name. If a share with the same name already exists, an exception is thrown.

To create a share, you must have the `CREATE SHARE` privilege for the Unity Catalog metastore where the data you want to share is registered.

To add content to the share, use [ALTER SHARE](https://docs.databricks.com/aws/en/sql/language-manual/sql-ref-syntax-ddl-alter-share.md).

## Syntax

```
CREATE SHARE [ IF NOT EXISTS ] share_name
    [ COMMENT comment ]
```

## Parameters

* **[share\_name](https://docs.databricks.com/aws/en/sql/language-manual/sql-ref-names.md#share-name)**

  The name of the share to be created.

* **IF NOT EXISTS**

  Creates a share with the given name if it does not exist. If a share with the same name already exists, nothing will happen.

* **comment**

  An optional `STRING` literal. The description for the share.

## Examples

```sql
-- Create share `customer_share`. This throws exception if a share with name customer_share
-- already exists.
> CREATE SHARE customer_share;

-- Create share `customer_share` only if share with same name doesn't exist.
> CREATE SHARE IF NOT EXISTS customer_share;

-- Create share `customer_share` only if share with same name doesn't exist, with a comment.
> CREATE SHARE IF NOT EXISTS customer_share COMMENT 'This is customer share';
```

## Related articles

* [Change data feed](https://docs.databricks.com/aws/en/tables/features/change-data-feed.md)
* [DESCRIBE SHARE](https://docs.databricks.com/aws/en/sql/language-manual/sql-ref-syntax-aux-describe-share.md)
* [ALTER SHARE](https://docs.databricks.com/aws/en/sql/language-manual/sql-ref-syntax-ddl-alter-share.md)
* [DROP SHARE](https://docs.databricks.com/aws/en/sql/language-manual/sql-ref-syntax-ddl-drop-share.md)
* [SHOW SHARES](https://docs.databricks.com/aws/en/sql/language-manual/sql-ref-syntax-aux-show-shares.md)
* [SHOW ALL IN SHARE](https://docs.databricks.com/aws/en/sql/language-manual/sql-ref-syntax-aux-show-all-in-share.md)
* [COMMENT ON SHARE](https://docs.databricks.com/aws/en/sql/language-manual/sql-ref-syntax-ddl-comment.md)
