Database Reference
In-Depth Information
The following screenshot shows how
DESCRIBE FORMATTED
displays the results to
show the difference:
The INSERT statement
The
INSERT
statement is use to insert data into tables and partitions, which are
already created using the
CREATE TABLE
statement. Impala can also use the
INSERT
statement with the tables that are created in Hive as they both share the
same metastore. The
INSERT
statement can use various clauses, such as
INTO
or
OVERWRITE
, which change the
INSERT
statement behavior; so, let's learn more
about the key features of the
INSERT
statement:
•
INSERT INTO
statement
: This appends data into table
•
INSERT OVERWRITE
statement
: This replaces the data in the table with the
new data
To insert data into a table, you will use the
INSERT
statement with the
SELECT
state-
ment, as shown in the following line of code: