Previous Topic: FETCH StatementNext Topic: OPEN Statement


INSERT Statement

The INSERT statement inserts new rows into a table. You can insert as many rows as needed.

Syntax

LSQL INSERT INTO tablename [(columnlist)][[VALUES(list)] [querystatement]]

Parameters

columnlist

Column names that store the values that valuelist specified. If you do not specify columnlist values, the SQL server stores the values into the columns in the order in which they were defined on the CREATE TABLE statement for this table.

querystatement

Query statement that retrieves the values to be inserted into the table. This query can be any valid search criteria.

tablename

Name of the table into which you are inserting a row.

VALUES(list)

Column values for the new row. A value can be a character string, a numeric string, or a host variable. Commas separate values in the list.

Notes:

Examples