<?xml version="1.0" encoding="iso-8859-1"?>
<?xml-stylesheet href="../make-menu.xsl" type="text/xsl"?><html>
   <head>
      <this-is section="sql-extension" page="insert" subpage=""/>
      <!--
           Generated at 2010-10-29T18:20:48.427+01:00--><title>Saxonica: XSLT and XQuery Processing: sql:insert and sql:column</title>
      <meta name="coverage" content="Worldwide"/>
      <meta name="copyright" content="Copyright Saxonica Ltd"/>
      <meta name="title"
            content="Saxonica: XSLT and XQuery Processing: sql:insert and sql:column"/>
      <meta name="robots" content="noindex,nofollow"/>
      <link rel="stylesheet" href="../saxondocs.css" type="text/css"/>
   </head>
   <body class="main">
      <h1>sql:insert and sql:column</h1>
      <p><code>sql:insert</code> performs an SQL INSERT statement. This causes a row to be added to the table identified
by the <code>table</code> attribute. The <code>table</code> 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.</p>
      <p>There is a mandatory <code>connection</code> attribute, used as in the <code>sql:query</code>
instruction described <a class="bodylink" href="../sql-extension/query.xml">above</a>.</p>
      <p><code>sql:column</code> is used as a child element of <code>sql:insert</code>, 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 <code>name</code> attribute,
the value may be indicated either by evaluating the expression contained in the <code>select</code> attribute, or
as the expanded contents of the <code>sql:column</code> 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).</p>
      <table width="100%">
         <tr>
            <td>
               <p align="right"><a class="nav" href="update.xml">Next</a></p>
            </td>
         </tr>
      </table>
   </body>
</html>