sql:insert

Performs an SQL INSERT statement. This causes a row to be added to the table identified by the table attribute. The table attribute holds the table name as a constant string; it is not possible to set the name of the table (or of the columns) at run-time.

Attributes

connection

expression

The database connection. The value is an expression, which must evaluate to a database connection object as returned by sql:connect.

table

string

The name of the table into which the row is to be added. The value is a constant string; it is not possible to set the name of the table (or of the columns) at run-time.

Saxon availability

Requires Saxon-PE or Saxon-EE. Available for Java only.

Details

An sql:column may be used as a child element of sql:insert, to identify the name and value of a column to be included in the INSERT statement. The name of the column is identified by the name attribute, the value may be indicated either by evaluating the expression contained in the select attribute, or as the expanded contents of the sql:column element. The value is converted to the required data type if possible.