INSERT

 

Function

The INSERT statement inserts a new row into the target table using values derived from the row amendment expression .  

 

Syntax

insert.bmp
 

table_specification

A qualified or unqualified identifier which refers to the table to be amended. The table must be defined at this statement's compilation time. If the table specification is a view reference this view must be updatable. See Table Specification for more details.

expression

Defines the value which is to be assigned to the specified column.

 

 

query_expression

 

Defines a resultant table which will be used as a source of values for assignment to the specified columns.  See Query Expression.

 

Description

An INSERT statement inserts a number of new rows into the target table as specified by the row amendment expression.

Limitations

ANSI Specifics

None.

 

CONNX Specifics

None.

 

 

Example

The following example inserts a new row into the table cruise.

 

INSERT INTO cruise (cruise_id ,   start_date,  start_time,  end_date,  end_time,  start_harbor ,

    destination_harbor,  cruise_price,  bunk_number, bunks_free,  id_yacht,

    id_skipper,  id_predecessor ,   id_successor )

values ( 5037, 1234,19920925,12,19921206,14,'ACAPULCO',

   'LIVERPOOL', 2050, 7, 10 146, 244, 5037, 5039)