Help Center/
CloudTable Service/
User Guide/
Using Doris/
Common SQL Commands of Doris/
Inserting Data
Updated on 2025-08-12 GMT+08:00
Inserting Data
This section describes the basic syntax and usage of the SQL statements for inserting table data in a Doris cluster.
Basic Syntax
INSERT INTO table_name [ PARTITION (p1, ...) ] [ WITH LABEL label] [ (column [, ...]) ] [ [ hint [, ...] ] ] { VALUES ( { expression | DEFAULT } [, ...] ) [, ...] | query }
Usage Example
- Create table test.
CREATE TABLE test ( c1 TINYINT, c2 DECIMAL(10, 2) DEFAULT "10.5", ) COMMENT "table comment" DISTRIBUTED BY HASH(k1) BUCKETS 32;
- Create table test2.
CREATE TABLE test2 like test;
- Insert multiple rows of data into the test table at a time.
INSERT INTO test VALUES (1, 2), (3, 4);
- Check whether data is inserted into test2.
SELECT * from test2;
- Import the result of a query statement to the test table.
INSERT INTO test (c1, c2) SELECT * from test2;
Parent topic: Common SQL Commands of Doris
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
The system is busy. Please try again later.
For any further questions, feel free to contact us through the chatbot.
Chatbot