ddtek:sql-insert
This built-in function inserts a single record in a database table.
The syntax is:
declare updating function ddtek:sql-insert( table as xs:string, column as xs:string, value as item()*, ...) external;where:
tableis the database table in which to insert the record. The semantics oftableare equivalent to those for fn:collection(); see "Specifying Relational Database Tables".
columnis the column of the database table in which to insert a value.
valueis the value to insert into the specified column.
columnandvalueare a pair in a variable argument list. Ifcolumnis specified withoutvalue, an error is raised. You can specify multiple values for this pair, as shown in the example.The following example inserts a new record with three columns into the holdings table. The columns and their values are
userid=Minollo, stockticker=TIVO, and shares=200.Other examples can be found in the RDBMSUpdate example.