Previous Topic: FETCH Statement

Next 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]]

Operand

Explanation

columnlist

The column names that store the values specified with valuelist. 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

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

tablename

The name of the table into which you are inserting a row.

VALUES(list)

The column values for the new row. A value can be a character string, a numeric string, or a host variable. Values in the list are separated by commas.

Notes:

Examples