Use the INSERT statement to insert rows into a table.
Parameters, clauses, keywords, and variables
▪ from-constructor: Column values to insert in the table. If you do not provide the column names, you must list the column values in the order in which the columns were defined when the table was created (or altered). If you include the column names, the values do not need to be in any specific order as long as the order of the column list matches the order of the value list.
▪ insert‑value: A literal, a scalar function, or a variable in a procedure.
Examples
INSERT INTO TEST (C, ID) VALUES (0.22, 5); INSERT INTO TEST VALUES (0.35, 9);
Multirow inserts can also be done. For example, to insert three rows in one statement, you can use the following statement:
You can insert default values by using the DEFAULT VALUES statement or by not specifying any column names or values. You can also assign a specific value for one column and use the default value for another column. These methods as shown in the following examples:
INSERT INTO TEST DEFAULT VALUES;
INSERT INTO TEST () VALUES ();
INSERT INTO TEST (C, ID) VALUES (0.35, DEFAULT);
INSERT INTO TEST (C, ID) SELECT A, B FROM INPUT_TO_TEST;