INSERT/INSERT ... SELECT Syntax (Datalake Form) | VantageCloud Lake - INSERT/INSERT ... SELECT Syntax (Datalake Form) - Teradata Vantage

Teradata® VantageCloud Lake

Deployment
VantageCloud
Edition
Lake
Product
Teradata Vantage
Published
January 2023
ft:locale
en-US
ft:lastEdition
2024-12-11
dita:mapPath
phg1621910019905.ditamap
dita:ditavalPath
pny1626732985837.ditaval
dita:id
phg1621910019905

INSERT Single-Row Statement

INSERT INTO datalake_name.otf_database_name.otf_table_name
  VALUES (value[, ...])

INSERT/SELECT Statement

INSERT INTO datalake_name.otf_database_name.otf_table_name
 SELECT * | column-name[, ...] 
 FROM [database_name.]source_table |
      datalake_name.otf_database_name.otf_table_name
 [WHERE where_clause]

Syntax Elements

column_name
Name of the column, such as col1, first_name, and so on.
database_name
Name of the database where the Datalake table is.
datalake_name
Name of the Datalake object.
otf_database_name
Name of the database in the Open Table Format (OTF) catalog.
otf_table_name
Name of the OTF table you are inserting. Table must exist.
source_table
Name of an existing Block File System, Object File System, or Open Table Format table whose columns are to appear in the table you are inserting into a database.
WHERE
A conditional clause. For more information see WHERE Clause.
You can only specify a scalar UDF for search_condition if the UDF is invoked within an expression and returns a value expression.
If you specify a WHERE clause, you must have SELECT access on the searched objects.