Documentation Source Text

Check-in [0b36750358]
Login

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

Overview
Comment:Clarification of what it means for the expression in a DEFAULT clause to be constant.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 0b367503581d92549c2373e46a2f4729d555655d
User & Date: drh 2014-02-22 13:55:53.814
Context
2014-02-28
12:26
Minor clarifications of recent documentation. (check-in: e139253c4b user: drh tags: trunk)
2014-02-22
13:55
Clarification of what it means for the expression in a DEFAULT clause to be constant. (check-in: 0b36750358 user: drh tags: trunk)
2014-02-21
13:21
Update the all-bnf.html file. (check-in: 424fd15707 user: drh tags: trunk)
Changes
Unified Diff Ignore Whitespace Patch
Changes to pages/lang.in.
758
759
760
761
762
763
764
765

766
767
768
769
770
771
772
is no explicit DEFAULT clause attached to a column definition, then the 
default value of the column is NULL. ^(An explicit DEFAULT clause may specify
that the default value is NULL, a string constant, a blob constant, a
signed-number, or any constant expression enclosed in parentheses. An explicit
default value may also be one of the special case-independent keywords
CURRENT_TIME, CURRENT_DATE or CURRENT_TIMESTAMP.)^ ^For the purposes of the
DEFAULT clause, an expression is considered constant provided that it does
not contain any sub-queries or string constants enclosed in double quotes.


<p>^(Each time a row is inserted into the table by an INSERT statement that 
does not provide explicit values for all table columns the values stored in
the new row are determined by their default values)^, as follows:

<ul>
  <li><p>^If the default value of the column is a constant NULL, text, blob or







|
>







758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
is no explicit DEFAULT clause attached to a column definition, then the 
default value of the column is NULL. ^(An explicit DEFAULT clause may specify
that the default value is NULL, a string constant, a blob constant, a
signed-number, or any constant expression enclosed in parentheses. An explicit
default value may also be one of the special case-independent keywords
CURRENT_TIME, CURRENT_DATE or CURRENT_TIMESTAMP.)^ ^For the purposes of the
DEFAULT clause, an expression is considered constant provided that it does
not contain any sub-queries, column or table references, or string literals
enclosed in double-quotes instead of single-quotes.

<p>^(Each time a row is inserted into the table by an INSERT statement that 
does not provide explicit values for all table columns the values stored in
the new row are determined by their default values)^, as follows:

<ul>
  <li><p>^If the default value of the column is a constant NULL, text, blob or