insert (dynamic command)

Description

Using a dynamic command, insert adds a new row to a table or view.

Syntax

insert [database.[owner.]]{table_name|view_name}[(column_list)] 
values (? [, ?]...) 

NoteAny valid object in the catalog can be substituted for table_name or view_name.

Parameters

column_list

is a list of one or more columns to which data is to be added. The columns can be in any order, but the incoming data (whether in a values clause or a select clause) is in the same order.

values

is a keyword that introduces a list of expressions.

? (question mark)

specifies a parameter marker passed by the application.

Examples

Example 1

insert titles
 (title_id, title, type, pub_id, notes, pubdate,
 		contract) 
 values (?, ?, ?, ?, ?, ?, ?)

Usage