Log out?

Insert, Update, Delete, InsertOrUpdate

The SQLXML Insert, Update, Delete, and InsertOrUpdate structures are basic SQL operations phrased in an XML structure. All of these structures operate on a similar basis, so we’ll utilize an Insert operation, and describe the differences from there.

An Insert operation is structured thus:

<sql:Insert>
        <tablename>
                <columnname key="boolean">value</columnname>
                <columnname key="boolean">value</columnname>
        </tablename>
</sql:Insert>

The functionality is fairly intuitive – specify a qualified tablename, and qualified column names, to be inserted into. Key specifies whether or not a given field is to be utilized in uniquely identifying this table – in the case of this, an Insert, it isn’t particularly important, but if this were an update, specifying the correct key becomes important. The key is your functional “where” clause, and the contents of key fields are those values which the key must equal. In an Update or an InsertOrUpdate, fields with an unspecified key boolean value are assumed not to be part of the key. In an Insert, the key attribute values are ignored. In a Delete, all fields are assumed to be key fields, and the key attribute values are also ignored.

This is a unique website which will require a more modern browser to work! Please upgrade today!

Thanks!

Our editors are notified.

Close