---
title: CREATE TABLE CLONE
description: Clone a Delta, Apache Iceberg, or Apache Parquet table to a target location with CREATE TABLE CLONE in Databricks SQL and Databricks Runtime, using deep or shallow clones.
canonical_url: https://docs.databricks.com/aws/en/sql/language-manual/delta-clone
---

# CREATE TABLE CLONE

**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

Clones a source Delta, managed Apache Iceberg, or Apache Parquet table to a target location at a specific version. Cloning can be either deep or shallow: deep clones copy the data, while shallow clones reference the source data without copying it.

* **Delta**, **Parquet**, and **Foreign Iceberg** tables support both deep and shallow cloning.
* Managed **Iceberg** tables support only deep cloning, and you can't change the table format during cloning.

For more information, see [Incrementally clone Parquet and Apache Iceberg tables to Delta Lake](https://docs.databricks.com/aws/en/ingestion/data-migration/clone-parquet.md).

In Databricks SQL and Databricks Runtime 13.3 LTS and above, you can use shallow clone with Unity Catalog managed tables. In Databricks Runtime 12.2 LTS and below, there is no support for shallow clones in Unity Catalog. See [Shallow clone for Unity Catalog tables](https://docs.databricks.com/aws/en/tables/operations/clone-unity-catalog.md).

> [!IMPORTANT]
>
> There are important differences between shallow and deep clones that can determine how best to use them. See [Clone a table on Databricks](https://docs.databricks.com/aws/en/tables/operations/clone.md).

> [!NOTE]
>
> Streaming tables and materialized views are not supported as source or target tables for `CLONE`. See [streaming table limitations](https://docs.databricks.com/aws/en/sql/language-manual/sql-ref-syntax-ddl-create-streaming-table.md#st-limitations) and [materialized view limitations](https://docs.databricks.com/aws/en/sql/language-manual/sql-ref-syntax-ddl-create-materialized-view.md#mv-limitations).

## Syntax

```
CREATE TABLE [IF NOT EXISTS] table_name
   [SHALLOW | DEEP] CLONE source_table_name [TBLPROPERTIES clause] [LOCATION path]
```

```
[CREATE OR] REPLACE TABLE table_name
   [SHALLOW | DEEP] CLONE source_table_name [TBLPROPERTIES clause] [LOCATION path]
```

## Parameters

* **IF NOT EXISTS**

  If specified, the statement is ignored if `table_name` already exists.

* **\[CREATE OR] REPLACE**

  If `CREATE OR` is specified the table is replaced if it exists and newly created if it does not.
  Without `CREATE OR` the `table_name` must exist.

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

  The name of the table to be created. The name must not include a [temporal specification or options specification](https://docs.databricks.com/aws/en/sql/language-manual/sql-ref-names.md#table-name).
  If the name is not qualified the table is created in the current schema.
  `table_name` must not exist already unless `REPLACE` or `IF NOT EXISTS` has been specified.

* **SHALLOW CLONE** or **DEEP CLONE**

  If you specify `SHALLOW CLONE` Databricks will make a copy of the source table's definition, but refer to the source table's files.
  When you specify `DEEP CLONE` (default) Databricks will make a complete, independent copy of the source table.

  Managed Iceberg tables only support deep cloning, not shallow cloning.

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

  The name of the table to be cloned. The name may include a [temporal specification or options specification](https://docs.databricks.com/aws/en/sql/language-manual/sql-ref-names.md#table-name).

* **[TBLPROPERTIES](https://docs.databricks.com/aws/en/sql/language-manual/sql-ref-syntax-ddl-tblproperties.md#tblproperties)**

  Optionally sets one or more user-defined properties.

* **LOCATION path**

  Optionally creates an external table, with the provided location as the path where the data is stored. If `table_name` itself is a path instead of a table identifier, the operation will fail.
  `path` must be a STRING literal.

## Examples

Deep clone and shallow clone a Delta Lake table:

```sql
-- Deep clone: copies data and metadata
CREATE TABLE target_catalog.target_schema.target_table
DEEP CLONE source_catalog.source_schema.source_table;

-- Shallow clone: copies metadata only, references source data files
CREATE TABLE target_catalog.target_schema.target_table
SHALLOW CLONE source_catalog.source_schema.source_table;
```

Deep clone a managed Iceberg table (only deep cloning is supported):

```sql
CREATE TABLE target_catalog.target_schema.target_table
DEEP CLONE source_catalog.source_schema.source_table;
```

For more Delta Lake clone examples, including data archiving and ML workflows, see [Clone a table on Databricks](https://docs.databricks.com/aws/en/tables/operations/clone.md). For more managed Iceberg clone examples, see [Clone a managed table that uses Iceberg](https://docs.databricks.com/aws/en/iceberg/clone.md).

## Limitations

* In Unity Catalog, you cannot use `CREATE OR REPLACE` to overwrite an existing shallow clone. Use `DROP TABLE` followed by `CREATE TABLE`, or use a new table name. See [Limitations](https://docs.databricks.com/aws/en/tables/operations/clone-unity-catalog.md#limitations).
