INSERT
Description
Inserts new rows into a table. (Redshift SQL Language Reference Insert Statement).
This syntax is partially supported in Snowflake.
Grammar Syntax
Sample Source Patterns
Setup data
Default Values
It inserts a complete row with its default values. If any columns do not have default values, NULL values are inserted in those columns.
This clause cannot specify individual columns; it always inserts a complete row with its default values. Additionally, columns with the NOT NULL constraint cannot be included in the table definition. To replicate this behavior in Snowflake, SnowConvert insert a column with a DEFAULT value in the table. This action inserts a complete row, using the default value for every column.
Input Code:
Output Code:
Query
Insert one or more rows into the table by using a query. All rows produced by the query will be inserted into the table. The query must return a column list that is compatible with the table’s columns, although the column names do not need to match. This functionality is fully equivalent in Snowflake.
Input Code:
Output Code:
Known Issues
Certain expressions cannot be used in the VALUES clause in Snowflake. For example, in Redshift, the JSON_PARSE function can be used within the VALUES clause to insert a JSON value into a SUPER data type. In Snowflake, however, the PARSE_JSON function cannot be used in the VALUES clause to insert a JSON value into a VARIANT data type. Instead, a query can be used in place of the VALUES clause. For more details, please refer to the Snowflake documentation. You can also check the following article for further information.
Related EWIs
There are no known issues.
Last updated