Update



UPDATE changes or adds fields in the documents that match the WHERE clause. Fields that don't exist in a document are added to it. Values can be expressions, including expressions on the document's current values.

round-pushpin Updates a single document.
UPDATE
    WordList:Word
SET
    Text = 'Neward',
    LanguageId = 2
WHERE
    Id = 1

round-pushpin Updates using the current value and adds a new field.
UPDATE
    WordList:Word
SET
    Text = ToUpper(Text),
    Reviewed = 1
WHERE
    LanguageId = 3

round-pushpin Updates documents based on a join. Name the alias of the schema to update after UPDATE, and list the schemas in a FROM clause.
UPDATE
    w
SET
    Text = w.Text + '!'
FROM
    WordList:Word as w
INNER JOIN WordList:Language as l
    ON l.Id = w.LanguageId
WHERE
    l.Name = 'French'




SQL :: Delete
Delete removes the documents that match the given criteria.
SQL :: Expressions
Literals, operators, comments and variables in KBSQL.
SQL :: Insert
Insert creates new documents in a schema.
SQL :: Keywords
A breakdown of all of the statements and keywords supported by the query processor.
SQL :: Logical Connectors
Connects one logical expression to another.
SQL :: Select
Select statements are used to read (or query) data from the database.
SQL :: Select Into
Creates a schema and fills it with the results of a SELECT.
SQL :: Where
The where clause filters the documents read, updated or deleted by a statement.