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.
There is a mandatory connection
attribute, used as in the sql:query
instruction described above.
sql:column
is used as a child element of sql:insert
, and identifies 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 always interpreted as a string.
(Remember this is purely a demonstration of extensibility, in a real system there would be a need to
cater for SQL columns of other data types).