solidDB Help : solidDB reference : SQL: Statements : INSERT INTO
  
INSERT INTO
INSERT INTO table‑name insert‑columns‑and‑source
where:
insert‑columns‑and‑source::= from‑subquery | from‑constructor | from‑default
from‑subquery::= [insert‑column‑name‑list] query-specification
insert‑column‑name‑list::= ([column‑name [, column‑name …]])
from‑constructor::= [insert‑column‑name‑list] VALUES row‑constructor[, row‑constructor …]]
row‑constructor::= ([insert‑item[, insert‑item …]])
insert‑item::= insert‑value | DEFAULT | NULL
from‑default::= DEFAULT VALUES
query-specification::= see query‑specification
Access requirements
INSERT privileges on table
Usage
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.
insertvalue: 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:
INSERT INTO employees VALUES (10021, 'Peter', 'Humlaut'), (10543, 'John', 'Wilson'), (10556, 'Bunba', 'Olo');
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;
Go up to
SQL: Statements