Inserting Data
This topic describes the basic SQL syntax and example statements for inserting table data.
Basic Syntax
INSERT INTO table_name
[ PARTITION (p1, ...) ]
[ WITH LABEL label]
[ (column [, ...]) ]
[ [ hint [, ...] ] ]
{ VALUES ( { expression | DEFAULT } [, ...] ) [, ...] | query }
Example
- Insert multiple rows of data into the test table at a time.
INSERT INTO test VALUES (1, 2), (3, 4);
- Import the result of a query statement to the test table.
INSERT INTO test (c1, c2) SELECT * from test2;
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.
For any further questions, feel free to contact us through the chatbot.
Chatbot