Small. Fast. Reliable.
Choose any three.

SQLite Requirement Matrix Details
lang_update.html

Index Summary Markup Original


R-38515-45264-03335-50980-08297-28344-12265-07348 tcl slt th3 src

An UPDATE statement is used to modify a subset of the values stored in zero or more rows of the database table identified by the qualified-table-name specified as part of the UPDATE statement.

slt/slt_lang_update.test:19   tcl/e_update.test:104

/* IMP: R-38515-45264 */
# EVIDENCE-OF: R-38515-45264 An UPDATE statement is used to modify a
# subset of the values stored in zero or more rows of the database table
# identified by the qualified-table-name specified as part of the UPDATE
# statement.

R-55869-30521-47622-53163-51064-21445-33319-34731 tcl slt th3 src

If the UPDATE statement does not have a WHERE clause, all rows in the table are modified by the UPDATE.

tcl/e_update.test:132

/* IMP: R-55869-30521 */
# EVIDENCE-OF: R-55869-30521 If the UPDATE statement does not have a
# WHERE clause, all rows in the table are modified by the UPDATE.

R-58095-46013-00121-55474-24418-20779-51878-39971 tcl slt th3 src

Otherwise, the UPDATE affects only those rows for which the WHERE clause boolean expression is true.

slt/slt_lang_update.test:53   tcl/e_update.test:149

/* IMP: R-58095-46013 */
# EVIDENCE-OF: R-58095-46013 Otherwise, the UPDATE affects only those
# rows for which the WHERE clause boolean expression is true.

R-58129-20729-43334-45037-61775-65105-23500-10551 tcl slt th3 src

It is not an error if the WHERE clause does not evaluate to true for any row in the table - this just means that the UPDATE statement affects zero rows.

slt/slt_lang_update.test:64   tcl/e_update.test:173

/* IMP: R-58129-20729 */
# EVIDENCE-OF: R-58129-20729 It is not an error if the WHERE clause does
# not evaluate to true for any row in the table - this just means that
# the UPDATE statement affects zero rows.

R-40598-36595-56877-54174-64761-50948-11892-46483 tcl slt th3 src

For each affected row, the named columns are set to the values found by evaluating the corresponding scalar expressions.

slt/slt_lang_update.test:71   tcl/e_update.test:198

/* IMP: R-40598-36595 */
# EVIDENCE-OF: R-40598-36595 For each affected row, the named columns
# are set to the values found by evaluating the corresponding scalar
# expressions.

R-34751-18293-04541-58685-13120-57905-41689-08740 tcl slt th3 src

If a single column-name appears more than once in the list of assignment expressions, all but the rightmost occurrence is ignored.

slt/slt_lang_update.test:83   tcl/e_update.test:235

/* IMP: R-34751-18293 */
# EVIDENCE-OF: R-34751-18293 If a single column-name appears more than
# once in the list of assignment expressions, all but the rightmost
# occurrence is ignored.

R-40472-60438-03331-36186-60982-36973-59940-12981 tcl slt th3 src

Columns that do not appear in the list of assignments are left unmodified.

slt/slt_lang_update.test:109   tcl/e_update.test:202

/* IMP: R-40472-60438 */
# EVIDENCE-OF: R-40472-60438 Columns that do not appear in the list of
# assignments are left unmodified.

R-36239-04077-08470-54931-40517-19628-02448-15955 tcl slt th3 src

The scalar expressions may refer to columns of the row being updated.

slt/slt_lang_update.test:125   tcl/e_update.test:247

/* IMP: R-36239-04077 */
# EVIDENCE-OF: R-36239-04077 The scalar expressions may refer to columns
# of the row being updated.

R-04558-24451-40018-59769-17015-19792-37809-52993 tcl slt th3 src

In this case all scalar expressions are evaluated before any assignments are made.

slt/slt_lang_update.test:128   tcl/e_update.test:250

/* IMP: R-04558-24451 */
# EVIDENCE-OF: R-04558-24451 In this case all scalar expressions are
# evaluated before any assignments are made.

R-28518-13457-48277-27328-18424-50932-01795-30236 tcl slt th3 src

The optional "OR action" conflict clause that follows the UPDATE keyword allows the user to nominate a specific constraint conflict resolution algorithm to use during this one UPDATE command.

tcl/e_update.test:267

/* IMP: R-28518-13457 */
# EVIDENCE-OF: R-28518-13457 The optional "OR action" conflict clause
# that follows the UPDATE keyword allows the user to nominate a specific
# constraint conflict resolution algorithm to use during this one UPDATE
# command.

R-12123-54095-45651-21328-13666-03690-37485-08653 tcl slt th3 src

The table-name specified as part of an UPDATE statement within a trigger body must be unqualified.

tcl/e_update.test:322

/* IMP: R-12123-54095 */
# EVIDENCE-OF: R-12123-54095 The table-name specified as part of an
# UPDATE statement within a trigger body must be unqualified.

R-43190-62442-20010-51227-34344-19852-62865-03762 tcl slt th3 src

In other words, the schema-name. prefix on the table name of the UPDATE is not allowed within triggers.

tcl/e_update.test:325

/* IMP: R-43190-62442 */
# EVIDENCE-OF: R-43190-62442 In other words, the schema-name. prefix on
# the table name of the UPDATE is not allowed within triggers.

R-06085-13761-54522-48441-51146-08233-07521-56188 tcl slt th3 src

Unless the table to which the trigger is attached is in the TEMP database, the table being updated by the trigger program must reside in the same database as it.

tcl/e_update.test:350

/* IMP: R-06085-13761 */
# EVIDENCE-OF: R-06085-13761 Unless the table to which the trigger is
# attached is in the TEMP database, the table being updated by the
# trigger program must reside in the same database as it.

R-29512-54644-05780-17564-45452-02840-21704-61078 tcl slt th3 src

If the table to which the trigger is attached is in the TEMP database, then the unqualified name of the table being updated is resolved in the same way as it is for a top-level statement (by searching first the TEMP database, then the main database, then any other databases in the order they were attached).

tcl/e_update.test:376

/* IMP: R-29512-54644 */
# EVIDENCE-OF: R-29512-54644 If the table to which the trigger is
# attached is in the TEMP database, then the unqualified name of the
# table being updated is resolved in the same way as it is for a
# top-level statement (by searching first the TEMP database, then the
# main database, then any other databases in the order they were
# attached).

R-19619-42762-44736-08897-02902-26192-57996-46412 tcl slt th3 src

The INDEXED BY and NOT INDEXED clauses are not allowed on UPDATE statements within triggers.

tcl/e_update.test:438

/* IMP: R-19619-42762 */
# EVIDENCE-OF: R-19619-42762 The INDEXED BY and NOT INDEXED clauses are
# not allowed on UPDATE statements within triggers.

R-57359-59558-63770-19476-57809-18440-47111-21364 tcl slt th3 src

The LIMIT and ORDER BY clauses for UPDATE are unsupported within triggers, regardless of the compilation options used to build SQLite.

tcl/e_update.test:459

/* IMP: R-57359-59558 */
# EVIDENCE-OF: R-57359-59558 The LIMIT and ORDER BY clauses for UPDATE
# are unsupported within triggers, regardless of the compilation options
# used to build SQLite.

R-59581-44104-07622-44169-35142-09947-54214-52613 tcl slt th3 src

If SQLite is built with the SQLITE_ENABLE_UPDATE_DELETE_LIMIT compile-time option then the syntax of the UPDATE statement is extended with optional ORDER BY and LIMIT clauses

tcl/e_update.test:491

/* IMP: R-59581-44104 */
# EVIDENCE-OF: R-59581-44104 If SQLite is built with the
# SQLITE_ENABLE_UPDATE_DELETE_LIMIT compile-time option then the syntax
# of the UPDATE statement is extended with optional ORDER BY and LIMIT
# clauses

R-58862-44169-03141-46737-61496-44954-25565-37290 tcl slt th3 src

If an UPDATE statement has a LIMIT clause, the maximum number of rows that will be updated is found by evaluating the accompanying expression and casting it to an integer value.

tcl/e_update.test:527

/* IMP: R-58862-44169 */
# EVIDENCE-OF: R-58862-44169 If an UPDATE statement has a LIMIT clause,
# the maximum number of rows that will be updated is found by evaluating
# the accompanying expression and casting it to an integer value.

R-63582-45120-10136-38887-13737-27800-47314-58816 tcl slt th3 src

A negative value is interpreted as "no limit".

tcl/e_update.test:537

/* IMP: R-63582-45120 */
# EVIDENCE-OF: R-63582-45120 A negative value is interpreted as "no
# limit".

R-18628-11938-58280-60424-32964-58816-64179-48454 tcl slt th3 src

If the LIMIT expression evaluates to non-negative value N and the UPDATE statement has an ORDER BY clause, then all rows that would be updated in the absence of the LIMIT clause are sorted according to the ORDER BY and the first N updated.

tcl/e_update.test:546

/* IMP: R-18628-11938 */
# EVIDENCE-OF: R-18628-11938 If the LIMIT expression evaluates to
# non-negative value N and the UPDATE statement has an ORDER BY clause,
# then all rows that would be updated in the absence of the LIMIT clause
# are sorted according to the ORDER BY and the first N updated.

R-30955-38324-06638-08685-16466-65436-15533-06365 tcl slt th3 src

If the UPDATE statement also has an OFFSET clause, then it is similarly evaluated and cast to an integer value. If the OFFSET expression evaluates to a non-negative value M, then the first M rows are skipped and the following N rows updated instead.

tcl/e_update.test:559

/* IMP: R-30955-38324 */
# EVIDENCE-OF: R-30955-38324 If the UPDATE statement also has an OFFSET
# clause, then it is similarly evaluated and cast to an integer value.
# If the OFFSET expression evaluates to a non-negative value M, then the
# first M rows are skipped and the following N rows updated instead.

R-19486-35828-58507-08873-52072-46615-25523-07720 tcl slt th3 src

If the UPDATE statement has no ORDER BY clause, then all rows that would be updated in the absence of the LIMIT clause are assembled in an arbitrary order before applying the LIMIT and OFFSET clauses to determine which are actually updated.

tcl/e_update.test:571

/* IMP: R-19486-35828 */
# EVIDENCE-OF: R-19486-35828 If the UPDATE statement has no ORDER BY
# clause, then all rows that would be updated in the absence of the
# LIMIT clause are assembled in an arbitrary order before applying the
# LIMIT and OFFSET clauses to determine which are actually updated.

R-10927-26133-64625-21951-56674-25631-48081-51767 tcl slt th3 src

The ORDER BY clause on an UPDATE statement is used only to determine which rows fall within the LIMIT. The order in which rows are modified is arbitrary and is not influenced by the ORDER BY clause.

tcl/e_update.test:584

/* IMP: R-10927-26133 */
# EVIDENCE-OF: R-10927-26133 The ORDER BY clause on an UPDATE statement
# is used only to determine which rows fall within the LIMIT. The order
# in which rows are modified is arbitrary and is not influenced by the
# ORDER BY clause.