Updated on 2024-04-28 GMT+08:00

INSERT

The Teradata INSERT (short key INS) statement is used to insert records into a table. DSC supports the INSERT statement.

The INSERT INTO TABLE table_name syntax is used in Teradata SQL, but is not supported by GaussDB(DWS). GaussDB(DWS) supports only INSERT INTO table_name. Therefore, remove the keyword TABLE when using DSC.

Input

INSERT TABLE tab1 
SELECT col1, col2 
  FROM tab2 
 WHERE col3 > 0;

Output

INSERT INTO tab1 
SELECT col1, col2 
  FROM tab2 
 WHERE col3 > 0;