CREATE TABLE (Databricks SQL)

Defines a table in an existing database.

You can use any of three different means to create a table for different purposes:

  • CREATE TABLE [USING]

    Use this syntax if the new table will be:

    • Based on a column definition you provide.
    • Derived from data at an existing storage location.
    • Derived from a query.
  • CREATE TABLE LIKE

    Using this syntax you create a new table based on the definition, but not the data, of another table.

  • CREATE TABLE CLONE

    You can use table cloning for Delta Lake tables to achieve two major goals:

    • Make a complete, independent copy of a table including its definition and data at a specific version. This is called a DEEP CLONE.
    • Make a copy of the definition of the table which refers to the original table’s storage for the initial data at a specific version. Updates, on either the source or the new table will not affect the other. However the new table depends on the source table’s existence and column definition.