8.8. CREATE TABLE

    The optional clause causes the error to besuppressed if the table already exists.

    The optional WITH clause can be used to set propertieson the newly created table or on single columns. To list all available tableproperties, run the following query:

    1. SELECT * FROM system.metadata.table_properties

    The LIKE clause can be used to include all the column definitions froman existing table in the new table. Multiple LIKE clauses may bespecified, which allows copying the columns from multiple tables.

    If is specified, all of the table properties arecopied to the new table. If the WITH clause specifies the same propertyname as one of the copied properties, the value from the WITH clausewill be used. The default behavior is EXCLUDING PROPERTIES. The option maybe specified for at most one table.

    1. orderkey bigint,
    2. orderstatus varchar,
    3. totalprice double,
    4. orderdate date
    5. )

    Create the table orders if it does not already exist, adding a table commentand a column comment:

    Create the table bigger_orders using the columns from plus additional columns at the start and end:

    1. CREATE TABLE bigger_orders (
    2. another_orderkey bigint,
    3. LIKE orders,
    4. another_orderdate date
    5. )