Inserting Data

Function

This statement is used to insert the SELECT query result or a certain data record into a table.

Syntax

Keywords

Table 1 INSERT keywords

Parameter

Description

db_name

Name of the database where the target table resides.

table_name

Name of the target table.

part_spec

Detailed partition information. If there are multiple partition fields, all fields must be contained, but the corresponding values are optional. The system matches the corresponding partition. A maximum of 100,000 partitions can be created in a single table.

select_statement

SELECT query on the source table (DLI and OBS tables).

values_row

Value to be inserted to a table. Use commas (,) to separate columns.

Precautions

Example

Before importing data, you must create a table. For details, see Creating an OBS Table or Creating a DLI Table.