Like Table
Description
Specifies that the columns of the table have the same name and description as the columns of the specified table.
Grammar Syntax
<like clause> ::=
LIKE <table name> [ <like options> ]
<like options> ::=
<like option> ...
<like option> ::=
<identity option>
| <column default option>
| <generation option>
<identity option> ::=
INCLUDING IDENTITY
| EXCLUDING IDENTITY
<column default option> ::=
INCLUDING DEFAULTS
| EXCLUDING DEFAULTS
<generation option> ::=
INCLUDING GENERATED
| EXCLUDING GENERATED
Click here to go to the ANSI SQL Standard specification for this syntax.
Sample Source Patterns
ANSI SQL Input Code
CREATE TABLE TABLE01
LIKE TABLE02 INCLUDING IDENTITY;
Snowflake Output Code
CREATE TABLE TABLE01
LIKE TABLE02
-- ** MSC-WARNING - MSCEWI1002 - REMOVED NEXT STATEMENT, NOT APPLICABLE IN SNOWFLAKE. LIKE CLAUSE IDENTITY OPTION **
-- INCLUDING IDENTITY
;
Related EWIs
MSCEWI1002: Removed next statement, not applicable in SnowFlake
Last updated
Was this helpful?