Documentation Source Text

Check-in [e7259b8c39]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Further changes to lang_update.html.
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: e7259b8c39b3b24dc312a38421e3dd176b41fd18
User & Date: dan 2010-09-21 16:58:55
Context
2010-09-23
18:46
Changes to lang_update.html. check-in: 32506c4e82 user: dan tags: trunk
2010-09-21
16:58
Further changes to lang_update.html. check-in: e7259b8c39 user: dan tags: trunk
2010-09-20
19:09
Changes to lang_update.html to make it more testable. check-in: 5df6adc2a9 user: dan tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to pages/lang.in.

3011
3012
3013
3014
3015
3016
3017

3018
3019
3020

3021




3022
3023
3024
3025
3026
3027
3028
3029
....
3032
3033
3034
3035
3036
3037
3038
3039
3040















3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051

<h3>Restrictions on UPDATE Statements Within CREATE TRIGGER</h3>

<p>The following additional syntax restrictions apply to UPDATE statements that
occur within the body of a [CREATE TRIGGER] statement.  

<ul>

  <li><p>^The <i>table-name</i> of the UPDATE must be unqualified. ^(In other
      words, the <i>database-name</i><b>.</b> prefix on the table name of the
      UPDATE is not allowed within triggers.)^ ^The table to be updated must 

      reside in the same database as the table to which the trigger is




      attached.

  <li><p>^The INDEXED BY and NOT INDEXED clauses are not allowed on UPDATE
      statements within triggers.</p>

  <li><p>^The LIMIT and ORDER BY clauses for UPDATE are unsupported within
      triggers, regardless of the compilation options used to build SQLite.
</ul>
................................................................................

<p>^(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)^ as follows:</p>

<tcl>BubbleDiagram update-stmt-limited</tcl>

<p>^The optional LIMIT clause can be used to limit the number of
rows modified, and thereby limit the size of the transaction.















^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 determined by the ORDER BY clause.</p>

<tcl>
##############################################################################
Section VACUUM vacuum VACUUM

BubbleDiagram vacuum-stmt 1
</tcl>







>
|
|
|
>
|
>
>
>
>
|







 







|
|
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
|
<
|
|







3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
....
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062

3063
3064
3065
3066
3067
3068
3069
3070
3071

<h3>Restrictions on UPDATE Statements Within CREATE TRIGGER</h3>

<p>The following additional syntax restrictions apply to UPDATE statements that
occur within the body of a [CREATE TRIGGER] statement.  

<ul>
  <li><p>^The <i>table-name</i> specified as part of an UPDATE statement within
      a trigger body must be unqualified. ^(In other words, the
      <i>database-name</i><b>.</b> prefix on the table name of the UPDATE is
      not allowed within triggers.)^ ^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. ^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).

  <li><p>^The INDEXED BY and NOT INDEXED clauses are not allowed on UPDATE
      statements within triggers.</p>

  <li><p>^The LIMIT and ORDER BY clauses for UPDATE are unsupported within
      triggers, regardless of the compilation options used to build SQLite.
</ul>
................................................................................

<p>^(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)^ as follows:</p>

<tcl>BubbleDiagram update-stmt-limited</tcl>

<p>^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. ^A negative value is interpreted as "no limit".

<p>^If the LIMIT expression evaluates to non-negative value <i>N</i> 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 <i>N</i> updated. ^(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 <i>M</i>, then the first <i>M</i>
rows are skipped and the following <i>N</i> rows updated instead.)^

<p>^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.

<p>^(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>
##############################################################################
Section VACUUM vacuum VACUUM

BubbleDiagram vacuum-stmt 1
</tcl>