System.Data.SQLite
Check-in [e57d6e37d5]
Not logged in

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

Overview
Comment:1.0.35.1
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | sourceforge
Files: files | file ages | folders
SHA1: e57d6e37d5c0c9e05e7c04a33a3bc4bd985a7d61
User & Date: rmsimpson 2006-09-11 21:15:38
Context
2006-10-05
21:18
Work in progress check-in: 230b880a4c user: rmsimpson tags: sourceforge
2006-09-11
21:15
1.0.35.1 check-in: e57d6e37d5 user: rmsimpson tags: sourceforge
2006-09-10
19:36
1.0.35.0 check-in: 1156e2bf74 user: rmsimpson tags: sourceforge
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Added Doc/Extra/contents.hhc.























































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<HTML>
<HEAD>
<meta name="GENERATOR" content="Microsoft&reg; HTML Help Workshop 4.1">
<!-- Sitemap 1.0 -->
</HEAD><BODY>
<UL>
	<LI> <OBJECT type="text/sitemap">
		<param name="Name" value="Introduction">
		<param name="Local" value="welcome.html">
		</OBJECT>
	<UL>
		<LI> <OBJECT type="text/sitemap">
			<param name="Name" value="Installing Design-Time Support">
			<param name="Local" value="designer.html">
			</OBJECT>
		<LI> <OBJECT type="text/sitemap">
			<param name="Name" value="Using DbProviderFactories">
			<param name="Local" value="dbfactorysupport.html">
			</OBJECT>
		<LI> <OBJECT type="text/sitemap">
			<param name="Name" value="Optimizing SQL Queries">
			<param name="Local" value="optimizing.html">
			</OBJECT>
		<LI> <OBJECT type="text/sitemap">
			<param name="Name" value="Provider Limitations">
			<param name="Local" value="LImitations.html">
			</OBJECT>
		<LI> <OBJECT type="text/sitemap">
			<param name="Name" value="Version History">
			<param name="Local" value="version.html">
			</OBJECT>
	</UL>
	<LI> <OBJECT type="text/sitemap">
		<param name="Name" value="SQLite Language Reference">
		<param name="Local" value="syntax.html">
		</OBJECT>
	<UL>
		<LI> <OBJECT type="text/sitemap">
			<param name="Name" value="ALTER TABLE">
			<param name="Local" value="lang_altertable.html">
			</OBJECT>
		<LI> <OBJECT type="text/sitemap">
			<param name="Name" value="ANALYZE">
			<param name="Local" value="lang_analyze.html">
			</OBJECT>
		<LI> <OBJECT type="text/sitemap">
			<param name="Name" value="ATTACH DATABASE">
			<param name="Local" value="lang_attach.html">
			</OBJECT>
		<LI> <OBJECT type="text/sitemap">
			<param name="Name" value="BEGIN TRANSACTION">
			<param name="Local" value="lang_transaction.html">
			</OBJECT>
		<LI> <OBJECT type="text/sitemap">
			<param name="Name" value="comment">
			<param name="Local" value="lang_comment.html">
			</OBJECT>
		<LI> <OBJECT type="text/sitemap">
			<param name="Name" value="COMMIT TRANSACTION">
			<param name="Local" value="lang_transaction.html">
			</OBJECT>
		<LI> <OBJECT type="text/sitemap">
			<param name="Name" value="CREATE INDEX">
			<param name="Local" value="lang_createindex.html">
			</OBJECT>
		<LI> <OBJECT type="text/sitemap">
			<param name="Name" value="CREATE TABLE">
			<param name="Local" value="lang_createtable.html">
			</OBJECT>
		<LI> <OBJECT type="text/sitemap">
			<param name="Name" value="CREATE TRIGGER">
			<param name="Local" value="lang_createtrigger.html">
			</OBJECT>
		<LI> <OBJECT type="text/sitemap">
			<param name="Name" value="CREATE VIEW">
			<param name="Local" value="lang_createview.html">
			</OBJECT>
		<LI> <OBJECT type="text/sitemap">
			<param name="Name" value="CREATE VIRTUAL TABLE">
			<param name="Local" value="lang_createvtab.html">
			</OBJECT>
		<LI> <OBJECT type="text/sitemap">
			<param name="Name" value="DELETE">
			<param name="Local" value="lang_delete.html">
			</OBJECT>
		<LI> <OBJECT type="text/sitemap">
			<param name="Name" value="DETACH DATABASE">
			<param name="Local" value="lang_detach.html">
			</OBJECT>
		<LI> <OBJECT type="text/sitemap">
			<param name="Name" value="DROP INDEX">
			<param name="Local" value="lang_dropindex.html">
			</OBJECT>
		<LI> <OBJECT type="text/sitemap">
			<param name="Name" value="DROP TABLE">
			<param name="Local" value="lang_droptable.html">
			</OBJECT>
		<LI> <OBJECT type="text/sitemap">
			<param name="Name" value="DROP TRIGGER">
			<param name="Local" value="lang_droptrigger.html">
			</OBJECT>
		<LI> <OBJECT type="text/sitemap">
			<param name="Name" value="DROP VIEW">
			<param name="Local" value="lang_dropview.html">
			</OBJECT>
		<LI> <OBJECT type="text/sitemap">
			<param name="Name" value="END TRANSACTION">
			<param name="Local" value="lang_transaction.html">
			</OBJECT>
		<LI> <OBJECT type="text/sitemap">
			<param name="Name" value="EXPLAIN">
			<param name="Local" value="lang_explain.html">
			</OBJECT>
		<LI> <OBJECT type="text/sitemap">
			<param name="Name" value="expression">
			<param name="Local" value="lang_expr.html">
			</OBJECT>
		<LI> <OBJECT type="text/sitemap">
			<param name="Name" value="INSERT">
			<param name="Local" value="lang_insert.html">
			</OBJECT>
		<LI> <OBJECT type="text/sitemap">
			<param name="Name" value="ON CONFLICT">
			<param name="Local" value="lang_conflict.html">
			</OBJECT>
		<LI> <OBJECT type="text/sitemap">
			<param name="Name" value="PRAGMA">
			<param name="Local" value="pragma.html">
			</OBJECT>
		<LI> <OBJECT type="text/sitemap">
			<param name="Name" value="REINDEX">
			<param name="Local" value="lang_reindex.html">
			</OBJECT>
		<LI> <OBJECT type="text/sitemap">
			<param name="Name" value="REPLACE">
			<param name="Local" value="lang_replace.html">
			</OBJECT>
		<LI> <OBJECT type="text/sitemap">
			<param name="Name" value="ROLLBACK TRANSACTION">
			<param name="Local" value="lang_transaction.html">
			</OBJECT>
		<LI> <OBJECT type="text/sitemap">
			<param name="Name" value="SELECT">
			<param name="Local" value="lang_select.html">
			</OBJECT>
		<LI> <OBJECT type="text/sitemap">
			<param name="Name" value="UPDATE">
			<param name="Local" value="lang_update.html">
			</OBJECT>
		<LI> <OBJECT type="text/sitemap">
			<param name="Name" value="VACUUM">
			<param name="Local" value="lang_vacuum.html">
			</OBJECT>
	</UL>

Changes to Doc/Extra/dbfactorysupport.html.

93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
&lt;configuration&gt;
  &lt;system.data&gt;
    &lt;DbProviderFactories&gt;
      &lt;remove invariant="System.Data.SQLite"/&gt;
      &lt;add name="SQLite Data Provider" invariant="System.Data.SQLite" 
           description=".Net Framework Data Provider for SQLite"
           type="System.Data.SQLite.SQLiteFactory, System.Data.SQLite,
                 Version=1.0.34.0, Culture=neutral,
                 PublicKeyToken=db937bc2d44ff139"/&gt;
    &lt;/DbProviderFactories&gt;
  &lt;/system.data&gt;
&lt;/configuration&gt;
</pre>
      </div>
      <p>







|







93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
&lt;configuration&gt;
  &lt;system.data&gt;
    &lt;DbProviderFactories&gt;
      &lt;remove invariant="System.Data.SQLite"/&gt;
      &lt;add name="SQLite Data Provider" invariant="System.Data.SQLite" 
           description=".Net Framework Data Provider for SQLite"
           type="System.Data.SQLite.SQLiteFactory, System.Data.SQLite,
                 Version=1.0.35.1, Culture=neutral,
                 PublicKeyToken=db937bc2d44ff139"/&gt;
    &lt;/DbProviderFactories&gt;
  &lt;/system.data&gt;
&lt;/configuration&gt;
</pre>
      </div>
      <p>

Changes to Doc/Extra/lang_altertable.html.

56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
      <h1 class="heading">
        SQL As Understood By SQLite</h1>
      <h4>
        ALTER TABLE</h4>
      <p>
        <table cellpadding="10">
          <tr>
            <td align="right" valign="top">
              <i><font color="#ff3434">sql-statement</font></i> ::=</td>
            <td>
              <b><font color="#2c2cf0">ALTER TABLE </font></b>[<b><font color="#2c2cf0"></font></b><i><font
                color="#ff3434">database-name</font></i><b><font color="#2c2cf0"> <big>.</big></font></b>]<b><font
                  color="#2c2cf0"> </font></b><i><font color="#ff3434">table-name</font></i><b><font
                    color="#2c2cf0"> </font></b><i><font color="#ff3434">alteration</font></i><b><font
                      color="#2c2cf0"></font></b></td>
          </tr>
          <tr>
            <td align="right" valign="top">
              <i><font color="#ff3434">alteration</font></i> ::=</td>
            <td>
              <b><font color="#2c2cf0">RENAME TO </font></b><i><font color="#ff3434">new-table-name</font></i><b><font
                color="#2c2cf0"></font></b></td>
          </tr>
          <tr>
            <td align="right" valign="top">
              <i><font color="#ff3434">alteration</font></i> ::=</td>
            <td>
              <b><font color="#2c2cf0">ADD </font></b>[<b><font color="#2c2cf0">COLUMN</font></b>]<b><font
                color="#2c2cf0"> </font></b><i><font color="#ff3434">column-def</font></i><b><font
                  color="#2c2cf0"></font></b></td>
          </tr>
        </table>







|









|






|







56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
      <h1 class="heading">
        SQL As Understood By SQLite</h1>
      <h4>
        ALTER TABLE</h4>
      <p>
        <table cellpadding="10">
          <tr>
            <td align="right" width="1%" nowrap>
              <i><font color="#ff3434">sql-statement</font></i> ::=</td>
            <td>
              <b><font color="#2c2cf0">ALTER TABLE </font></b>[<b><font color="#2c2cf0"></font></b><i><font
                color="#ff3434">database-name</font></i><b><font color="#2c2cf0"> <big>.</big></font></b>]<b><font
                  color="#2c2cf0"> </font></b><i><font color="#ff3434">table-name</font></i><b><font
                    color="#2c2cf0"> </font></b><i><font color="#ff3434">alteration</font></i><b><font
                      color="#2c2cf0"></font></b></td>
          </tr>
          <tr>
            <td align="right" width="1%" nowrap>
              <i><font color="#ff3434">alteration</font></i> ::=</td>
            <td>
              <b><font color="#2c2cf0">RENAME TO </font></b><i><font color="#ff3434">new-table-name</font></i><b><font
                color="#2c2cf0"></font></b></td>
          </tr>
          <tr>
            <td align="right" width="1%" nowrap>
              <i><font color="#ff3434">alteration</font></i> ::=</td>
            <td>
              <b><font color="#2c2cf0">ADD </font></b>[<b><font color="#2c2cf0">COLUMN</font></b>]<b><font
                color="#2c2cf0"> </font></b><i><font color="#ff3434">column-def</font></i><b><font
                  color="#2c2cf0"></font></b></td>
          </tr>
        </table>

Changes to Doc/Extra/lang_analyze.html.

56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
      <h1 class="heading">
        SQL As Understood By SQLite</h1>
      <h4>
        ANALYZE</h4>
      <p>
        <table cellpadding="10">
          <tr>
            <td align="right" valign="top">
              <i><font color="#ff3434">sql-statement</font></i> ::=</td>
            <td>
              <b><font color="#2c2cf0">ANALYZE</font></b></td>
          </tr>
        </table>
        <table cellpadding="10">
          <tr>
            <td align="right" valign="top">
              <i><font color="#ff3434">sql-statement</font></i> ::=</td>
            <td>
              <b><font color="#2c2cf0">ANALYZE </font></b><i><font color="#ff3434">database-name</font></i><b><font
                color="#2c2cf0"></font></b></td>
          </tr>
        </table>
        <table cellpadding="10">
          <tr>
            <td align="right" valign="top">
              <i><font color="#ff3434">sql-statement</font></i> ::=</td>
            <td>
              <b><font color="#2c2cf0">ANALYZE </font></b>[<b><font color="#2c2cf0"></font></b><i><font
                color="#ff3434">database-name</font></i><b><font color="#2c2cf0"> <big>.</big></font></b>]<b><font
                  color="#2c2cf0"> </font></b><i><font color="#ff3434">table-name</font></i><b><font
                    color="#2c2cf0"></font></b></td>
          </tr>







|







|








|







56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
      <h1 class="heading">
        SQL As Understood By SQLite</h1>
      <h4>
        ANALYZE</h4>
      <p>
        <table cellpadding="10">
          <tr>
            <td align="right" width="1%" nowrap>
              <i><font color="#ff3434">sql-statement</font></i> ::=</td>
            <td>
              <b><font color="#2c2cf0">ANALYZE</font></b></td>
          </tr>
        </table>
        <table cellpadding="10">
          <tr>
            <td align="right" width="1%" nowrap>
              <i><font color="#ff3434">sql-statement</font></i> ::=</td>
            <td>
              <b><font color="#2c2cf0">ANALYZE </font></b><i><font color="#ff3434">database-name</font></i><b><font
                color="#2c2cf0"></font></b></td>
          </tr>
        </table>
        <table cellpadding="10">
          <tr>
            <td align="right" width="1%" nowrap>
              <i><font color="#ff3434">sql-statement</font></i> ::=</td>
            <td>
              <b><font color="#2c2cf0">ANALYZE </font></b>[<b><font color="#2c2cf0"></font></b><i><font
                color="#ff3434">database-name</font></i><b><font color="#2c2cf0"> <big>.</big></font></b>]<b><font
                  color="#2c2cf0"> </font></b><i><font color="#ff3434">table-name</font></i><b><font
                    color="#2c2cf0"></font></b></td>
          </tr>

Changes to Doc/Extra/lang_attach.html.

56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
      <h1 class="heading">
        SQL As Understood By SQLite</h1>
      <h4>
        ATTACH DATABASE</h4>
      <p>
        <table cellpadding="10">
          <tr>
            <td align="right" valign="top">
              <i><font color="#ff3434">sql-statement</font></i> ::=</td>
            <td>
              <b><font color="#2c2cf0">ATTACH </font></b>[<b><font color="#2c2cf0">DATABASE</font></b>]<b><font
                color="#2c2cf0"> </font></b><i><font color="#ff3434">database-filename</font></i><b><font
                  color="#2c2cf0"> AS </font></b><i><font color="#ff3434">database-name</font></i><b><font
                    color="#2c2cf0"></font></b></td>
          </tr>







|







56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
      <h1 class="heading">
        SQL As Understood By SQLite</h1>
      <h4>
        ATTACH DATABASE</h4>
      <p>
        <table cellpadding="10">
          <tr>
            <td align="right" width="1%" nowrap>
              <i><font color="#ff3434">sql-statement</font></i> ::=</td>
            <td>
              <b><font color="#2c2cf0">ATTACH </font></b>[<b><font color="#2c2cf0">DATABASE</font></b>]<b><font
                color="#2c2cf0"> </font></b><i><font color="#ff3434">database-filename</font></i><b><font
                  color="#2c2cf0"> AS </font></b><i><font color="#ff3434">database-name</font></i><b><font
                    color="#2c2cf0"></font></b></td>
          </tr>

Changes to Doc/Extra/lang_comment.html.

56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
      <h1 class="heading">
        SQL As Understood By SQLite</h1>
      <h4>
        comment</h4>
      <p>
        <table cellpadding="10">
          <tr>
            <td align="right" valign="top">
              <i><font color="#ff3434">comment</font></i> ::=</td>
            <td>
              <b><font color="#2c2cf0"></font></b><i><font color="#ff3434">SQL-comment</font></i><b><font
                color="#2c2cf0"> </font></b><big>|</big><b><font color="#2c2cf0"> </font></b><i><font
                  color="#ff3434">C-comment</font></i><b><font color="#2c2cf0"></font></b></td>
          </tr>
          <tr>
            <td align="right" valign="top">
              <i><font color="#ff3434">SQL-comment</font></i> ::=</td>
            <td>
              <b><font color="#2c2cf0">-- </font></b><i><font color="#ff3434">single-line</font></i><b><font
                color="#2c2cf0"></font></b></td>
          </tr>
          <tr>
            <td align="right" valign="top">
              <i><font color="#ff3434">C-comment</font></i> ::=</td>
            <td>
              <b><font color="#2c2cf0">/<big>*</big> </font></b><i><font color="#ff3434">multiple-lines</font></i><b><font
                color="#2c2cf0"> </font></b>[<b><font color="#2c2cf0"><big>*</big>/</font></b>]<b><font
                  color="#2c2cf0"></font></b></td>
          </tr>
        </table>







|







|






|







56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
      <h1 class="heading">
        SQL As Understood By SQLite</h1>
      <h4>
        comment</h4>
      <p>
        <table cellpadding="10">
          <tr>
            <td align="right" width="1%" nowrap>
              <i><font color="#ff3434">comment</font></i> ::=</td>
            <td>
              <b><font color="#2c2cf0"></font></b><i><font color="#ff3434">SQL-comment</font></i><b><font
                color="#2c2cf0"> </font></b><big>|</big><b><font color="#2c2cf0"> </font></b><i><font
                  color="#ff3434">C-comment</font></i><b><font color="#2c2cf0"></font></b></td>
          </tr>
          <tr>
            <td align="right" width="1%" nowrap>
              <i><font color="#ff3434">SQL-comment</font></i> ::=</td>
            <td>
              <b><font color="#2c2cf0">-- </font></b><i><font color="#ff3434">single-line</font></i><b><font
                color="#2c2cf0"></font></b></td>
          </tr>
          <tr>
            <td align="right" width="1%" nowrap>
              <i><font color="#ff3434">C-comment</font></i> ::=</td>
            <td>
              <b><font color="#2c2cf0">/<big>*</big> </font></b><i><font color="#ff3434">multiple-lines</font></i><b><font
                color="#2c2cf0"> </font></b>[<b><font color="#2c2cf0"><big>*</big>/</font></b>]<b><font
                  color="#2c2cf0"></font></b></td>
          </tr>
        </table>

Changes to Doc/Extra/lang_conflict.html.

56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
      <h1 class="heading">
        SQL As Understood By SQLite</h1>
      <h4>
        ON CONFLICT clause</h4>
      <p>
        <table cellpadding="10">
          <tr>
            <td align="right" valign="top">
              <i><font color="#ff3434">conflict-clause</font></i> ::=</td>
            <td>
              <b><font color="#2c2cf0">ON CONFLICT </font></b><i><font color="#ff3434">conflict-algorithm</font></i><b><font
                color="#2c2cf0"></font></b></td>
          </tr>
          <tr>
            <td align="right" valign="top">
              <i><font color="#ff3434">conflict-algorithm</font></i> ::=</td>
            <td>
              <b><font color="#2c2cf0">ROLLBACK </font></b><big>|</big><b><font color="#2c2cf0">
                ABORT </font></b><big>|</big><b><font color="#2c2cf0"> FAIL </font></b><big>|</big><b><font
                  color="#2c2cf0"> IGNORE </font></b><big>|</big><b><font color="#2c2cf0"> REPLACE</font></b></td>
          </tr>
        </table>







|






|







56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
      <h1 class="heading">
        SQL As Understood By SQLite</h1>
      <h4>
        ON CONFLICT clause</h4>
      <p>
        <table cellpadding="10">
          <tr>
            <td align="right" width="1%" nowrap>
              <i><font color="#ff3434">conflict-clause</font></i> ::=</td>
            <td>
              <b><font color="#2c2cf0">ON CONFLICT </font></b><i><font color="#ff3434">conflict-algorithm</font></i><b><font
                color="#2c2cf0"></font></b></td>
          </tr>
          <tr>
            <td align="right" width="1%" nowrap>
              <i><font color="#ff3434">conflict-algorithm</font></i> ::=</td>
            <td>
              <b><font color="#2c2cf0">ROLLBACK </font></b><big>|</big><b><font color="#2c2cf0">
                ABORT </font></b><big>|</big><b><font color="#2c2cf0"> FAIL </font></b><big>|</big><b><font
                  color="#2c2cf0"> IGNORE </font></b><big>|</big><b><font color="#2c2cf0"> REPLACE</font></b></td>
          </tr>
        </table>

Changes to Doc/Extra/lang_createindex.html.

56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
..
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
      <h1 class="heading">
        SQL As Understood By SQLite</h1>
      <h4>
        CREATE INDEX</h4>
      <p>
        <table cellpadding="10">
          <tr>
            <td align="right" valign="top">
              <i><font color="#ff3434">sql-statement</font></i> ::=</td>
            <td>
              <b><font color="#2c2cf0">CREATE </font></b>[<b><font color="#2c2cf0">UNIQUE</font></b>]<b><font
                color="#2c2cf0"> INDEX </font></b>[<b><font color="#2c2cf0">IF NOT EXISTS</font></b>]<b><font
                  color="#2c2cf0"> </font></b>[<b><font color="#2c2cf0"></font></b><i><font color="#ff3434">database-name</font></i><b><font
                    color="#2c2cf0"> <big>.</big></font></b>]<b><font color="#2c2cf0"> </font></b>
              <i><font color="#ff3434">index-name</font></i><b><font color="#2c2cf0">
................................................................................
                ON </font></b><i><font color="#ff3434">table-name</font></i><b><font color="#2c2cf0">
                  <big>(</big> </font></b><i><font color="#ff3434">column-name</font></i><b><font color="#2c2cf0">
                  </font></b>[<b><font color="#2c2cf0"><big>,</big> </font></b><i><font color="#ff3434">
                    column-name</font></i><b><font color="#2c2cf0"></font></b>]<b><font color="#2c2cf0"></font></b><big>*</big><b><font
                      color="#2c2cf0"> <big>)</big></font></b></td>
          </tr>
          <tr>
            <td align="right" valign="top">
              <i><font color="#ff3434">column-name</font></i> ::=</td>
            <td>
              <b><font color="#2c2cf0"></font></b><i><font color="#ff3434">name</font></i><b><font
                color="#2c2cf0"> </font></b>[<b><font color="#2c2cf0"> COLLATE </font></b><i><font
                  color="#ff3434">collation-name</font></i><b><font color="#2c2cf0"></font></b>]<b><font
                    color="#2c2cf0"> </font></b>[<b><font color="#2c2cf0"> ASC </font></b><big>|</big><b><font
                      color="#2c2cf0"> DESC </font></b>]<b><font color="#2c2cf0"></font></b></td>







|







 







|







56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
..
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
      <h1 class="heading">
        SQL As Understood By SQLite</h1>
      <h4>
        CREATE INDEX</h4>
      <p>
        <table cellpadding="10">
          <tr>
            <td align="right" width="1%" nowrap>
              <i><font color="#ff3434">sql-statement</font></i> ::=</td>
            <td>
              <b><font color="#2c2cf0">CREATE </font></b>[<b><font color="#2c2cf0">UNIQUE</font></b>]<b><font
                color="#2c2cf0"> INDEX </font></b>[<b><font color="#2c2cf0">IF NOT EXISTS</font></b>]<b><font
                  color="#2c2cf0"> </font></b>[<b><font color="#2c2cf0"></font></b><i><font color="#ff3434">database-name</font></i><b><font
                    color="#2c2cf0"> <big>.</big></font></b>]<b><font color="#2c2cf0"> </font></b>
              <i><font color="#ff3434">index-name</font></i><b><font color="#2c2cf0">
................................................................................
                ON </font></b><i><font color="#ff3434">table-name</font></i><b><font color="#2c2cf0">
                  <big>(</big> </font></b><i><font color="#ff3434">column-name</font></i><b><font color="#2c2cf0">
                  </font></b>[<b><font color="#2c2cf0"><big>,</big> </font></b><i><font color="#ff3434">
                    column-name</font></i><b><font color="#2c2cf0"></font></b>]<b><font color="#2c2cf0"></font></b><big>*</big><b><font
                      color="#2c2cf0"> <big>)</big></font></b></td>
          </tr>
          <tr>
            <td align="right" width="1%" nowrap>
              <i><font color="#ff3434">column-name</font></i> ::=</td>
            <td>
              <b><font color="#2c2cf0"></font></b><i><font color="#ff3434">name</font></i><b><font
                color="#2c2cf0"> </font></b>[<b><font color="#2c2cf0"> COLLATE </font></b><i><font
                  color="#ff3434">collation-name</font></i><b><font color="#2c2cf0"></font></b>]<b><font
                    color="#2c2cf0"> </font></b>[<b><font color="#2c2cf0"> ASC </font></b><big>|</big><b><font
                      color="#2c2cf0"> DESC </font></b>]<b><font color="#2c2cf0"></font></b></td>

Changes to Doc/Extra/lang_createtable.html.

56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
..
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
...
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
...
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
      <h1 class="heading">
        SQL As Understood By SQLite</h1>
      <h4>
        CREATE TABLE</h4>
      <p>
        <table cellpadding="10">
          <tr>
            <td align="right" valign="top">
              <i><font color="#ff3434">sql-command</font></i> ::=</td>
            <td>
              <b><font color="#2c2cf0">CREATE </font></b>[<b><font color="#2c2cf0">TEMP </font></b>
              <big>|</big><b><font color="#2c2cf0"> TEMPORARY</font></b>]<b><font color="#2c2cf0">
                TABLE </font></b>[<b><font color="#2c2cf0">IF NOT EXISTS</font></b>]<b><font color="#2c2cf0">
                </font></b>[<b><font color="#2c2cf0"></font></b><i><font color="#ff3434">database-name</font></i><b><font
                  color="#2c2cf0"> <big>.</big></font></b>]<b><font color="#2c2cf0"> </font></b>
................................................................................
                    color="#2c2cf0"><br />
                    &nbsp; &nbsp; </font></b>[<b><font color="#2c2cf0"><big>,</big> </font></b>
              <i><font color="#ff3434">constraint</font></i><b><font color="#2c2cf0"></font></b>]<b><font
                color="#2c2cf0"></font></b><big>*</big><b><font color="#2c2cf0"><br />
                  <big>)</big></font></b></td>
          </tr>
          <tr>
            <td align="right" valign="top">
              <i><font color="#ff3434">sql-command</font></i> ::=</td>
            <td>
              <b><font color="#2c2cf0">CREATE </font></b>[<b><font color="#2c2cf0">TEMP </font></b>
              <big>|</big><b><font color="#2c2cf0"> TEMPORARY</font></b>]<b><font color="#2c2cf0">
                TABLE </font></b>[<b><font color="#2c2cf0"></font></b><i><font color="#ff3434">database-name</font></i><b><font
                  color="#2c2cf0"><big>.</big></font></b>]<b><font color="#2c2cf0"> </font></b>
              <i><font color="#ff3434">table-name</font></i><b><font color="#2c2cf0"> AS </font>
              </b><i><font color="#ff3434">select-statement</font></i><b><font color="#2c2cf0"></font></b></td>
          </tr>
          <tr>
            <td align="right" valign="top">
              <i><font color="#ff3434">column-def</font></i> ::=</td>
            <td>
              <b><font color="#2c2cf0"></font></b><i><font color="#ff3434">name</font></i><b><font
                color="#2c2cf0"> </font></b>[<b><font color="#2c2cf0"></font></b><i><font color="#ff3434">type</font></i><b><font
                  color="#2c2cf0"></font></b>]<b><font color="#2c2cf0"> </font></b>[<b><font color="#2c2cf0"></font></b>[<b><font
                    color="#2c2cf0">CONSTRAINT </font></b><i><font color="#ff3434">name</font></i><b><font
                      color="#2c2cf0"></font></b>]<b><font color="#2c2cf0"> </font></b><i><font color="#ff3434">
                        column-constraint</font></i><b><font color="#2c2cf0"></font></b>]<b><font color="#2c2cf0"></font></b><big>*</big><b><font
                          color="#2c2cf0"></font></b></td>
          </tr>
          <tr>
            <td align="right" valign="top">
              <i><font color="#ff3434">type</font></i> ::=</td>
            <td>
              <b><font color="#2c2cf0"></font></b><i><font color="#ff3434">typename</font></i><b><font
                color="#2c2cf0"> </font></b><big>|</big><b><font color="#2c2cf0"><br />
                </font></b><i><font color="#ff3434">typename</font></i><b><font color="#2c2cf0"> <big>
                  (</big> </font></b><i><font color="#ff3434">number</font></i><b><font color="#2c2cf0">
                    <big>)</big> </font></b><big>|</big><b><font color="#2c2cf0"><br />
                    </font></b><i><font color="#ff3434">typename</font></i><b><font color="#2c2cf0"> <big>
                      (</big> </font></b><i><font color="#ff3434">number</font></i><b><font color="#2c2cf0">
                        <big>,</big> </font></b><i><font color="#ff3434">number</font></i><b><font color="#2c2cf0">
                          <big>)</big></font></b></td>
          </tr>
          <tr>
            <td align="right" valign="top">
              <i><font color="#ff3434">column-constraint</font></i> ::=</td>
            <td>
              <b><font color="#2c2cf0">NOT NULL </font></b>[<b><font color="#2c2cf0"> </font></b>
              <i><font color="#ff3434">conflict-clause</font></i><b><font color="#2c2cf0"> </font>
              </b>]<b><font color="#2c2cf0"> </font></b><big>|</big><b><font color="#2c2cf0"><br />
                PRIMARY KEY </font></b>[<b><font color="#2c2cf0"></font></b><i><font color="#ff3434">sort-order</font></i><b><font
                  color="#2c2cf0"></font></b>]<b><font color="#2c2cf0"> </font></b>[<b><font color="#2c2cf0">
................................................................................
                          CHECK <big>(</big> </font></b><i><font color="#ff3434">expr</font></i><b><font color="#2c2cf0">
                            <big>)</big> </font></b><big>|</big><b><font color="#2c2cf0"><br />
                              DEFAULT </font></b><i><font color="#ff3434">value</font></i><b><font color="#2c2cf0">
                              </font></b><big>|</big><b><font color="#2c2cf0"><br />
                                COLLATE </font></b><i><font color="#ff3434">collation-name</font></i><b><font color="#2c2cf0"></font></b></td>
          </tr>
          <tr>
            <td align="right" valign="top">
              <i><font color="#ff3434">constraint</font></i> ::=</td>
            <td>
              <b><font color="#2c2cf0">PRIMARY KEY <big>(</big> </font></b><i><font color="#ff3434">
                column-list</font></i><b><font color="#2c2cf0"> <big>)</big> </font></b>[<b><font
                  color="#2c2cf0"> </font></b><i><font color="#ff3434">conflict-clause</font></i><b><font
                    color="#2c2cf0"> </font></b>]<b><font color="#2c2cf0"> </font></b><big>|</big><b><font
                      color="#2c2cf0"><br />
................................................................................
                        color="#2c2cf0"> <big>)</big> </font></b>[<b><font color="#2c2cf0"> </font></b>
              <i><font color="#ff3434">conflict-clause</font></i><b><font color="#2c2cf0"> </font>
              </b>]<b><font color="#2c2cf0"> </font></b><big>|</big><b><font color="#2c2cf0"><br />
                CHECK <big>(</big> </font></b><i><font color="#ff3434">expr</font></i><b><font color="#2c2cf0">
                  <big>)</big></font></b></td>
          </tr>
          <tr>
            <td align="right" valign="top">
              <i><font color="#ff3434">conflict-clause</font></i> ::=</td>
            <td>
              <b><font color="#2c2cf0">ON CONFLICT </font></b><i><font color="#ff3434">conflict-algorithm</font></i><b><font
                color="#2c2cf0"></font></b></td>
          </tr>
        </table>
      </p>







|







 







|










|











|













|







 







|







 







|







56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
..
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
...
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
...
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
      <h1 class="heading">
        SQL As Understood By SQLite</h1>
      <h4>
        CREATE TABLE</h4>
      <p>
        <table cellpadding="10">
          <tr>
            <td align="right" width="1%" nowrap>
              <i><font color="#ff3434">sql-command</font></i> ::=</td>
            <td>
              <b><font color="#2c2cf0">CREATE </font></b>[<b><font color="#2c2cf0">TEMP </font></b>
              <big>|</big><b><font color="#2c2cf0"> TEMPORARY</font></b>]<b><font color="#2c2cf0">
                TABLE </font></b>[<b><font color="#2c2cf0">IF NOT EXISTS</font></b>]<b><font color="#2c2cf0">
                </font></b>[<b><font color="#2c2cf0"></font></b><i><font color="#ff3434">database-name</font></i><b><font
                  color="#2c2cf0"> <big>.</big></font></b>]<b><font color="#2c2cf0"> </font></b>
................................................................................
                    color="#2c2cf0"><br />
                    &nbsp; &nbsp; </font></b>[<b><font color="#2c2cf0"><big>,</big> </font></b>
              <i><font color="#ff3434">constraint</font></i><b><font color="#2c2cf0"></font></b>]<b><font
                color="#2c2cf0"></font></b><big>*</big><b><font color="#2c2cf0"><br />
                  <big>)</big></font></b></td>
          </tr>
          <tr>
            <td align="right" width="1%" nowrap>
              <i><font color="#ff3434">sql-command</font></i> ::=</td>
            <td>
              <b><font color="#2c2cf0">CREATE </font></b>[<b><font color="#2c2cf0">TEMP </font></b>
              <big>|</big><b><font color="#2c2cf0"> TEMPORARY</font></b>]<b><font color="#2c2cf0">
                TABLE </font></b>[<b><font color="#2c2cf0"></font></b><i><font color="#ff3434">database-name</font></i><b><font
                  color="#2c2cf0"><big>.</big></font></b>]<b><font color="#2c2cf0"> </font></b>
              <i><font color="#ff3434">table-name</font></i><b><font color="#2c2cf0"> AS </font>
              </b><i><font color="#ff3434">select-statement</font></i><b><font color="#2c2cf0"></font></b></td>
          </tr>
          <tr>
            <td align="right" width="1%" nowrap>
              <i><font color="#ff3434">column-def</font></i> ::=</td>
            <td>
              <b><font color="#2c2cf0"></font></b><i><font color="#ff3434">name</font></i><b><font
                color="#2c2cf0"> </font></b>[<b><font color="#2c2cf0"></font></b><i><font color="#ff3434">type</font></i><b><font
                  color="#2c2cf0"></font></b>]<b><font color="#2c2cf0"> </font></b>[<b><font color="#2c2cf0"></font></b>[<b><font
                    color="#2c2cf0">CONSTRAINT </font></b><i><font color="#ff3434">name</font></i><b><font
                      color="#2c2cf0"></font></b>]<b><font color="#2c2cf0"> </font></b><i><font color="#ff3434">
                        column-constraint</font></i><b><font color="#2c2cf0"></font></b>]<b><font color="#2c2cf0"></font></b><big>*</big><b><font
                          color="#2c2cf0"></font></b></td>
          </tr>
          <tr>
            <td align="right" width="1%" nowrap>
              <i><font color="#ff3434">type</font></i> ::=</td>
            <td>
              <b><font color="#2c2cf0"></font></b><i><font color="#ff3434">typename</font></i><b><font
                color="#2c2cf0"> </font></b><big>|</big><b><font color="#2c2cf0"><br />
                </font></b><i><font color="#ff3434">typename</font></i><b><font color="#2c2cf0"> <big>
                  (</big> </font></b><i><font color="#ff3434">number</font></i><b><font color="#2c2cf0">
                    <big>)</big> </font></b><big>|</big><b><font color="#2c2cf0"><br />
                    </font></b><i><font color="#ff3434">typename</font></i><b><font color="#2c2cf0"> <big>
                      (</big> </font></b><i><font color="#ff3434">number</font></i><b><font color="#2c2cf0">
                        <big>,</big> </font></b><i><font color="#ff3434">number</font></i><b><font color="#2c2cf0">
                          <big>)</big></font></b></td>
          </tr>
          <tr>
            <td align="right" width="1%" nowrap>
              <i><font color="#ff3434">column-constraint</font></i> ::=</td>
            <td>
              <b><font color="#2c2cf0">NOT NULL </font></b>[<b><font color="#2c2cf0"> </font></b>
              <i><font color="#ff3434">conflict-clause</font></i><b><font color="#2c2cf0"> </font>
              </b>]<b><font color="#2c2cf0"> </font></b><big>|</big><b><font color="#2c2cf0"><br />
                PRIMARY KEY </font></b>[<b><font color="#2c2cf0"></font></b><i><font color="#ff3434">sort-order</font></i><b><font
                  color="#2c2cf0"></font></b>]<b><font color="#2c2cf0"> </font></b>[<b><font color="#2c2cf0">
................................................................................
                          CHECK <big>(</big> </font></b><i><font color="#ff3434">expr</font></i><b><font color="#2c2cf0">
                            <big>)</big> </font></b><big>|</big><b><font color="#2c2cf0"><br />
                              DEFAULT </font></b><i><font color="#ff3434">value</font></i><b><font color="#2c2cf0">
                              </font></b><big>|</big><b><font color="#2c2cf0"><br />
                                COLLATE </font></b><i><font color="#ff3434">collation-name</font></i><b><font color="#2c2cf0"></font></b></td>
          </tr>
          <tr>
            <td align="right" width="1%" nowrap>
              <i><font color="#ff3434">constraint</font></i> ::=</td>
            <td>
              <b><font color="#2c2cf0">PRIMARY KEY <big>(</big> </font></b><i><font color="#ff3434">
                column-list</font></i><b><font color="#2c2cf0"> <big>)</big> </font></b>[<b><font
                  color="#2c2cf0"> </font></b><i><font color="#ff3434">conflict-clause</font></i><b><font
                    color="#2c2cf0"> </font></b>]<b><font color="#2c2cf0"> </font></b><big>|</big><b><font
                      color="#2c2cf0"><br />
................................................................................
                        color="#2c2cf0"> <big>)</big> </font></b>[<b><font color="#2c2cf0"> </font></b>
              <i><font color="#ff3434">conflict-clause</font></i><b><font color="#2c2cf0"> </font>
              </b>]<b><font color="#2c2cf0"> </font></b><big>|</big><b><font color="#2c2cf0"><br />
                CHECK <big>(</big> </font></b><i><font color="#ff3434">expr</font></i><b><font color="#2c2cf0">
                  <big>)</big></font></b></td>
          </tr>
          <tr>
            <td align="right" width="1%" nowrap>
              <i><font color="#ff3434">conflict-clause</font></i> ::=</td>
            <td>
              <b><font color="#2c2cf0">ON CONFLICT </font></b><i><font color="#ff3434">conflict-algorithm</font></i><b><font
                color="#2c2cf0"></font></b></td>
          </tr>
        </table>
      </p>

Changes to Doc/Extra/lang_createtrigger.html.

56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
..
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
..
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
...
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
...
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
      <h1 class="heading">
        SQL As Understood By SQLite</h1>
      <h4>
        CREATE TRIGGER</h4>
      <p>
        <table cellpadding="10">
          <tr>
            <td align="right" valign="top">
              <i><font color="#ff3434">sql-statement</font></i> ::=</td>
            <td>
              <b><font color="#2c2cf0">CREATE </font></b>[<b><font color="#2c2cf0">TEMP </font></b>
              <big>|</big><b><font color="#2c2cf0"> TEMPORARY</font></b>]<b><font color="#2c2cf0">
                TRIGGER </font></b><i><font color="#ff3434">trigger-name</font></i><b><font color="#2c2cf0">
                </font></b>[<b><font color="#2c2cf0"> BEFORE </font></b><big>|</big><b><font color="#2c2cf0">
                  AFTER </font></b>]<b><font color="#2c2cf0"><br />
................................................................................
                      color="#2c2cf0"> <big>.</big></font></b>]<b><font color="#2c2cf0"> </font></b>
              <i><font color="#ff3434">table-name</font></i><b><font color="#2c2cf0"><br />
              </font></b><i><font color="#ff3434">trigger-action</font></i><b><font color="#2c2cf0"></font></b></td>
          </tr>
        </table>
        <table cellpadding="10">
          <tr>
            <td align="right" valign="top">
              <i><font color="#ff3434">sql-statement</font></i> ::=</td>
            <td>
              <b><font color="#2c2cf0">CREATE </font></b>[<b><font color="#2c2cf0">TEMP </font></b>
              <big>|</big><b><font color="#2c2cf0"> TEMPORARY</font></b>]<b><font color="#2c2cf0">
                TRIGGER </font></b><i><font color="#ff3434">trigger-name</font></i><b><font color="#2c2cf0">
                  INSTEAD OF<br />
                </font></b><i><font color="#ff3434">database-event</font></i><b><font color="#2c2cf0">
................................................................................
                    color="#2c2cf0"> <big>.</big></font></b>]<b><font color="#2c2cf0"> </font></b>
              <i><font color="#ff3434">view-name</font></i><b><font color="#2c2cf0"><br />
              </font></b><i><font color="#ff3434">trigger-action</font></i><b><font color="#2c2cf0"></font></b></td>
          </tr>
        </table>
        <table cellpadding="10">
          <tr>
            <td align="right" valign="top">
              <i><font color="#ff3434">database-event</font></i> ::=</td>
            <td>
              <b><font color="#2c2cf0">DELETE </font></b><big>|</big><b><font color="#2c2cf0">
                <br />
                INSERT </font></b><big>|</big><b><font color="#2c2cf0">
                  <br />
                  UPDATE </font></b><big>|</big><b><font color="#2c2cf0">
                    <br />
                    UPDATE OF </font></b><i><font color="#ff3434">column-list</font></i><b><font color="#2c2cf0"></font></b></td>
          </tr>
        </table>
        <table cellpadding="10">
          <tr>
            <td align="right" valign="top">
              <i><font color="#ff3434">trigger-action</font></i> ::=</td>
            <td>
              <b><font color="#2c2cf0"></font></b>[<b><font color="#2c2cf0"> FOR EACH ROW </font>
              </b><big>|</big><b><font color="#2c2cf0"> FOR EACH STATEMENT </font></b>]<b><font
                color="#2c2cf0"> </font></b>[<b><font color="#2c2cf0"> WHEN </font></b><i><font color="#ff3434">
                  expression</font></i><b><font color="#2c2cf0"> </font></b>]<b><font color="#2c2cf0">
                    <br />
................................................................................
                        trigger-step</font></i><b><font color="#2c2cf0"> ; </font></b>]<b><font color="#2c2cf0"></font></b><big>*</big><b><font
                          color="#2c2cf0"><br />
                          END</font></b></td>
          </tr>
        </table>
        <table cellpadding="10">
          <tr>
            <td align="right" valign="top">
              <i><font color="#ff3434">trigger-step</font></i> ::=</td>
            <td>
              <b><font color="#2c2cf0"></font></b><i><font color="#ff3434">update-statement</font></i><b><font
                color="#2c2cf0"> </font></b><big>|</big><b><font color="#2c2cf0"> </font></b><i><font
                  color="#ff3434">insert-statement</font></i><b><font color="#2c2cf0"> </font></b>
              <big>|</big><b><font color="#2c2cf0">
                <br />
................................................................................
        table with a PRIMARY KEY column instead of an INTEGER PRIMARY KEY column.</p>
      <p>
        A special SQL function RAISE() may be used within a trigger-program, with the following
        syntax</p>
      <p>
        <table cellpadding="10">
          <tr>
            <td align="right" valign="top">
              <i><font color="#ff3434">raise-function</font></i> ::=</td>
            <td>
              <b><font color="#2c2cf0">RAISE <big>(</big> ABORT<big>,</big> </font></b><i><font
                color="#ff3434">error-message</font></i><b><font color="#2c2cf0"> <big>)</big> </font>
                </b><big>|</big><b><font color="#2c2cf0">
                  <br />
                  RAISE <big>(</big> FAIL<big>,</big> </font></b><i><font color="#ff3434">error-message</font></i><b><font







|







 







|







 







|













|







 







|







 







|







56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
..
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
..
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
...
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
...
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
      <h1 class="heading">
        SQL As Understood By SQLite</h1>
      <h4>
        CREATE TRIGGER</h4>
      <p>
        <table cellpadding="10">
          <tr>
            <td align="right" width="1%" nowrap>
              <i><font color="#ff3434">sql-statement</font></i> ::=</td>
            <td>
              <b><font color="#2c2cf0">CREATE </font></b>[<b><font color="#2c2cf0">TEMP </font></b>
              <big>|</big><b><font color="#2c2cf0"> TEMPORARY</font></b>]<b><font color="#2c2cf0">
                TRIGGER </font></b><i><font color="#ff3434">trigger-name</font></i><b><font color="#2c2cf0">
                </font></b>[<b><font color="#2c2cf0"> BEFORE </font></b><big>|</big><b><font color="#2c2cf0">
                  AFTER </font></b>]<b><font color="#2c2cf0"><br />
................................................................................
                      color="#2c2cf0"> <big>.</big></font></b>]<b><font color="#2c2cf0"> </font></b>
              <i><font color="#ff3434">table-name</font></i><b><font color="#2c2cf0"><br />
              </font></b><i><font color="#ff3434">trigger-action</font></i><b><font color="#2c2cf0"></font></b></td>
          </tr>
        </table>
        <table cellpadding="10">
          <tr>
            <td align="right" width="1%" nowrap>
              <i><font color="#ff3434">sql-statement</font></i> ::=</td>
            <td>
              <b><font color="#2c2cf0">CREATE </font></b>[<b><font color="#2c2cf0">TEMP </font></b>
              <big>|</big><b><font color="#2c2cf0"> TEMPORARY</font></b>]<b><font color="#2c2cf0">
                TRIGGER </font></b><i><font color="#ff3434">trigger-name</font></i><b><font color="#2c2cf0">
                  INSTEAD OF<br />
                </font></b><i><font color="#ff3434">database-event</font></i><b><font color="#2c2cf0">
................................................................................
                    color="#2c2cf0"> <big>.</big></font></b>]<b><font color="#2c2cf0"> </font></b>
              <i><font color="#ff3434">view-name</font></i><b><font color="#2c2cf0"><br />
              </font></b><i><font color="#ff3434">trigger-action</font></i><b><font color="#2c2cf0"></font></b></td>
          </tr>
        </table>
        <table cellpadding="10">
          <tr>
            <td align="right" width="1%" nowrap>
              <i><font color="#ff3434">database-event</font></i> ::=</td>
            <td>
              <b><font color="#2c2cf0">DELETE </font></b><big>|</big><b><font color="#2c2cf0">
                <br />
                INSERT </font></b><big>|</big><b><font color="#2c2cf0">
                  <br />
                  UPDATE </font></b><big>|</big><b><font color="#2c2cf0">
                    <br />
                    UPDATE OF </font></b><i><font color="#ff3434">column-list</font></i><b><font color="#2c2cf0"></font></b></td>
          </tr>
        </table>
        <table cellpadding="10">
          <tr>
            <td align="right" width="1%" nowrap>
              <i><font color="#ff3434">trigger-action</font></i> ::=</td>
            <td>
              <b><font color="#2c2cf0"></font></b>[<b><font color="#2c2cf0"> FOR EACH ROW </font>
              </b><big>|</big><b><font color="#2c2cf0"> FOR EACH STATEMENT </font></b>]<b><font
                color="#2c2cf0"> </font></b>[<b><font color="#2c2cf0"> WHEN </font></b><i><font color="#ff3434">
                  expression</font></i><b><font color="#2c2cf0"> </font></b>]<b><font color="#2c2cf0">
                    <br />
................................................................................
                        trigger-step</font></i><b><font color="#2c2cf0"> ; </font></b>]<b><font color="#2c2cf0"></font></b><big>*</big><b><font
                          color="#2c2cf0"><br />
                          END</font></b></td>
          </tr>
        </table>
        <table cellpadding="10">
          <tr>
            <td align="right" width="1%" nowrap>
              <i><font color="#ff3434">trigger-step</font></i> ::=</td>
            <td>
              <b><font color="#2c2cf0"></font></b><i><font color="#ff3434">update-statement</font></i><b><font
                color="#2c2cf0"> </font></b><big>|</big><b><font color="#2c2cf0"> </font></b><i><font
                  color="#ff3434">insert-statement</font></i><b><font color="#2c2cf0"> </font></b>
              <big>|</big><b><font color="#2c2cf0">
                <br />
................................................................................
        table with a PRIMARY KEY column instead of an INTEGER PRIMARY KEY column.</p>
      <p>
        A special SQL function RAISE() may be used within a trigger-program, with the following
        syntax</p>
      <p>
        <table cellpadding="10">
          <tr>
            <td align="right" width="1%" nowrap>
              <i><font color="#ff3434">raise-function</font></i> ::=</td>
            <td>
              <b><font color="#2c2cf0">RAISE <big>(</big> ABORT<big>,</big> </font></b><i><font
                color="#ff3434">error-message</font></i><b><font color="#2c2cf0"> <big>)</big> </font>
                </b><big>|</big><b><font color="#2c2cf0">
                  <br />
                  RAISE <big>(</big> FAIL<big>,</big> </font></b><i><font color="#ff3434">error-message</font></i><b><font

Changes to Doc/Extra/lang_createview.html.

56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
      <h1 class="heading">
        SQL As Understood By SQLite</h1>
      <h4>
        CREATE VIEW</h4>
      <p>
        <table cellpadding="10">
          <tr>
            <td align="right" valign="top">
              <i><font color="#ff3434">sql-command</font></i> ::=</td>
            <td>
              <b><font color="#2c2cf0">CREATE </font></b>[<b><font color="#2c2cf0">TEMP </font></b>
              <big>|</big><b><font color="#2c2cf0"> TEMPORARY</font></b>]<b><font color="#2c2cf0">
                VIEW </font></b>[<b><font color="#2c2cf0"></font></b><i><font color="#ff3434">database-name</font></i><b><font
                  color="#2c2cf0"><big>.</big></font></b>]<b><font color="#2c2cf0"> </font></b>
              <i><font color="#ff3434">view-name</font></i><b><font color="#2c2cf0"> AS </font></b>







|







56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
      <h1 class="heading">
        SQL As Understood By SQLite</h1>
      <h4>
        CREATE VIEW</h4>
      <p>
        <table cellpadding="10">
          <tr>
            <td align="right" width="1%" nowrap>
              <i><font color="#ff3434">sql-command</font></i> ::=</td>
            <td>
              <b><font color="#2c2cf0">CREATE </font></b>[<b><font color="#2c2cf0">TEMP </font></b>
              <big>|</big><b><font color="#2c2cf0"> TEMPORARY</font></b>]<b><font color="#2c2cf0">
                VIEW </font></b>[<b><font color="#2c2cf0"></font></b><i><font color="#ff3434">database-name</font></i><b><font
                  color="#2c2cf0"><big>.</big></font></b>]<b><font color="#2c2cf0"> </font></b>
              <i><font color="#ff3434">view-name</font></i><b><font color="#2c2cf0"> AS </font></b>

Changes to Doc/Extra/lang_createvtab.html.

56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
      <h1 class="heading">
        SQL As Understood By SQLite</h1>
      <h4>
        CREATE VIRTUAL TABLE</h4>
      <p>
        <table cellpadding="10">
          <tr>
            <td align="right" valign="top">
              <i><font color="#ff3434">sql-command</font></i> ::=</td>
            <td>
              <b><font color="#2c2cf0">CREATE VIRTUAL TABLE </font></b>[<b><font color="#2c2cf0"></font></b><i><font
                color="#ff3434">database-name</font></i><b><font color="#2c2cf0"> <big>.</big></font></b>]<b><font
                  color="#2c2cf0"> </font></b><i><font color="#ff3434">table-name</font></i><b><font
                    color="#2c2cf0"> USING </font></b><i><font color="#ff3434">module-name</font></i><b><font
                      color="#2c2cf0"> </font></b>[<b><font color="#2c2cf0"><big>(</big> </font></b>







|







56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
      <h1 class="heading">
        SQL As Understood By SQLite</h1>
      <h4>
        CREATE VIRTUAL TABLE</h4>
      <p>
        <table cellpadding="10">
          <tr>
            <td align="right" width="1%" nowrap>
              <i><font color="#ff3434">sql-command</font></i> ::=</td>
            <td>
              <b><font color="#2c2cf0">CREATE VIRTUAL TABLE </font></b>[<b><font color="#2c2cf0"></font></b><i><font
                color="#ff3434">database-name</font></i><b><font color="#2c2cf0"> <big>.</big></font></b>]<b><font
                  color="#2c2cf0"> </font></b><i><font color="#ff3434">table-name</font></i><b><font
                    color="#2c2cf0"> USING </font></b><i><font color="#ff3434">module-name</font></i><b><font
                      color="#2c2cf0"> </font></b>[<b><font color="#2c2cf0"><big>(</big> </font></b>

Added Doc/Extra/lang_datetime.html.

































































































































































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
<html dir="LTR" xmlns="http://www.w3.org/1999/xhtml" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:MSHelp="http://msdn.microsoft.com/mshelp" xmlns:tool="http://www.microsoft.com/tooltip" xmlns:ndoc="urn:ndoc-preprocess">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=Windows-1252" />
    <title>DateTime Functions</title>
    <link rel="stylesheet" type="text/css" href="ndoc.css"> </link>
    <link rel="stylesheet" type="text/css" href="user.css"> </link>
    <script type="text/javascript" src="ndoc.js"> </script>
  </head>
  <body style="display: none;">
    <input type="hidden" id="userDataCache" class="userDataStyle" />
    <input type="hidden" id="hiddenScrollOffset" />
    <img id="dropDownImage" style="display:none; height:0; width:0;" src="drpdown.gif" />
    <img id="dropDownHoverImage" style="display:none; height:0; width:0;" src="drpdown_orange.gif" />
    <img id="collapseImage" style="display:none; height:0; width:0;" src="collapse.gif" />
    <img id="expandImage" style="display:none; height:0; width:0;" src="exp.gif" />
    <img id="collapseAllImage" style="display:none; height:0; width:0;" src="collall.gif" />
    <img id="expandAllImage" style="display:none; height:0; width:0;" src="expall.gif" />
    <img id="copyImage" style="display:none; height:0; width:0;" src="copycode.gif" />
    <img id="copyHoverImage" style="display:none; height:0; width:0;" src="copycodeHighlight.gif" />
    <div id="header">
      <table width="100%" id="topTable">
        <tr id="headerTableRow1">
          <td align="left">
            <span id="runningHeaderText">Date and Time Functions</span>&nbsp;</td>
        </tr>
        <tr id="headerTableRow2">
          <td align="left">
            <span id="nsrTitle">SQLite Language Reference Documentation</span>
          </td>
        </tr>
        <tr id="headerTableRow3" style="display:none">
          <td>
            <a id="seeAlsoSectionLink" href="#seeAlsoToggle" onclick="OpenSection(seeAlsoToggle)">See Also</a>
            <a id="exampleSectionLink" href="#codeExampleToggle" onclick="OpenSection(codeExampleToggle)">Example</a>
          </td>
        </tr>
     </table>
      <table width="100%" id="bottomTable" cellspacing="0" cellpadding="0" style="display:none">
        <tr>
          <td>
            <span onclick="ExpandCollapseAll(toggleAllImage)" style="cursor:default;" onkeypress="ExpandCollapseAll_CheckKey(toggleAllImage)" tabindex="0">
              <img ID="toggleAllImage" class="toggleAll" src="collall.gif" />
              <label id="collapseAllLabel" for="toggleAllImage" style="display: none;">
							Collapse All
						</label>
              <label id="expandAllLabel" for="toggleAllImage" style="display: none;">
							Expand All
						</label>
            </span>
          </td>
        </tr>
      </table>
    </div>
    <div id="mainSection">
    <div id="mainBody">
      <h1 class="heading">Date and Time Functions</h1>
<p>Five date and time functions are available, as follows:

<p><ol>
<li>date( <i>timestring</i>, <i>modifier</i>, <i>modifier</i>, ...)
<li>time( <i>timestring</i>, <i>modifier</i>, <i>modifier</i>, ...)
<li>datetime( <i>timestring</i>, <i>modifier</i>, <i>modifier</i>, ...)
<li>julianday( <i>timestring</i>, <i>modifier</i>, <i>modifier</i>, ...)
<li>strftime( <i>format</i>, <i>timestring</i>, <i>modifier</i>, <i>modifier</i>, ...)
</ol>

<p>All five functions take a time string as an argument.  This
time string may be followed by zero or more modifiers.  The
<b>strftime()</b> function also takes a format string as its first
argument.

<p>The <b>date()</b> function returns the date in this format: YYYY-MM-DD.
The <b>time()</b> function returns the time as HH:MM:SS.  The <b>datetime()</b>
function returns &quot;YYYY-MM-DD HH:MM:SS&quot;.  The <b>julianday()</b> function
returns the number of days since noon in Greenwich on November 24, 4714 B.C.
The julian day number is the preferred internal representation of
dates.  The <b>strftime()</b> routine returns the date formatted according
to the format string specified as the first argument.  The format string
supports most, but not all, of the more common substitutions found in
the strftime() function from the standard C library:

<p><pre>
   %d  day of month
   %f  ** fractional seconds  SS.SSS
   %H  hour 00-24
   %j  day of year 001-366
   %J  ** Julian day number
   %m  month 01-12
   %M  minute 00-59
   %s  seconds since 1970-01-01
   %S  seconds 00-59
   %w  day of week 0-6  sunday==0
   %W  week of year 00-53
   %Y  year 0000-9999
   %%  %
</pre>

<p>The %f and %J conversions are new.  Notice that all of the other four
functions could be expressed in terms of <b>strftime()</b>.

<p><pre>
   date(...)      -&gt;  strftime(&quot;%Y-%m-%d&quot;, ...)
   time(...)      -&gt;  strftime(&quot;%H:%M:%S&quot;, ...)
   datetime(...)  -&gt;  strftime(&quot;%Y-%m-%d %H:%M:%S&quot;, ...)
   julianday(...) -&gt;  strftime(&quot;%J&quot;, ...)
</pre>

<p>The only reasons for providing functions other than <b>strftime()</b> is for
convenience and for efficiency.

<p><b>Time Strings</b>

<p>A time string can be in any of the following formats:

<p><ol>
<li>YYYY-MM-DD
<li>YYYY-MM-DD HH:MM
<li>YYYY-MM-DD HH:MM:SS
<li>YYYY-MM-DD HH:MM:SS.SSS
<li>YYYY-MM-DDTHH:MM
<li>YYYY-MM-DDTHH:MM:SS
<li>YYYY-MM-DDTHH:MM:SS.SSS
<li>HH:MM
<li>HH:MM:SS
<li>HH:MM:SS.SSS
<li>now
<li>DDDD.DDDD
</ol>

<p>In formats 5 through 7, the &quot;T&quot; is a literal character separating the date and the time, as required by the ISO-8601 standard. These formats are supported in SQLite 3.2.0 and later.
Formats 8 through 10 that specify only a time assume a date of 2000-01-01.
Format 11, the string 'now', is converted into the current date and time.
Universal Coordinated Time (UTC) is used.
Format 12 is the julian day number expressed as a floating point value.

<p><b>Modifiers</b>

<p>The time string can be followed by zero or more modifiers that alter the
date or alter the interpretation of the date.  The available modifiers
are as follows.

<p><ol>
<li>NNN days
<li>NNN hours
<li>NNN minutes
<li>NNN.NNNN seconds
<li>NNN months  (see <a href="tktview?tn=551">#551</a>
 and <a href="chngview?cn=1163">[1163]</a>
)
<li>NNN years  (see <a href="tktview?tn=551">#551</a>
 and <a href="chngview?cn=1163">[1163]</a>
)
<li>start of month
<li>start of year
<li>start of week  (withdrawn -- will not be implemented)
<li>start of day
<li>weekday N  (see <a href="tktview?tn=551">#551</a>
 and <a href="chngview?cn=1163">[1163]</a>
)
<li>unixepoch
<li>localtime
<li>utc
</ol>

<p>The first six modifiers (1 through 6) simply add the specified amount
of time to the date specified by the preceding timestring.

<p>The &quot;start of&quot; modifiers (7 through 10) shift the date backwards to
the beginning of the current month, year or day.

<p>The &quot;weekday&quot; modifier advances the date forward to the next date where
the weekday number is N.  Sunday is 0, Monday is 1, and so forth.

<p>The &quot;unixepoch&quot; modifier (12) only works if it immediately follows
a timestring in the DDDDDDDDDD format.  This modifier causes the DDDDDDDDDD
to be interpreted not as a julian day number as it normally would be, but
as the number of seconds since 1970.  This modifier allows unix-based times
to be converted to julian day numbers easily.

<p>The &quot;localtime&quot; modifier (13) adjusts the previous time string so that it
displays the correct local time.  &quot;utc&quot; undoes this.

<p><b>Examples</b>

<p>Compute the current date.

<p><pre>
  SELECT date('now');
</pre>

<p>Compute the last day of the current month.

<p><pre>
  SELECT date('now','start of month','+1 month','-1 day');
</pre>

<p>Compute the date and time given a unix timestamp 1092941466.

<p><pre>
  SELECT datetime(1092941466, 'unixepoch');
</pre>

<p>Compute the date and time given a unix timestamp 1092941466, and compensate for your local timezone.

<p><pre>
  SELECT datetime(1092941466, 'unixepoch', 'localtime');
</pre>

<p>Compute the current unix timestamp.

<p><pre>
  SELECT strftime('%s','now');
</pre>

<p>Compute the number of days since the battle of Hastings.

<p><pre>
  SELECT julianday('now') - julianday('1066-10-14','gregorian');
</pre>

<p>Compute the number of seconds between two dates:

<p><pre>
  SELECT julianday('now')*86400 - julianday('2004-01-01 02:34:56')*86400;
</pre>

<p>Compute the date of the first Tuesday in October (January + 9) for the current
year.

<p><pre>
  SELECT date('now','start of year','+9 months','weekday 2');
</pre>

<p><b>Caveats And Bugs</b>

<p>The computation of local time depends heavily on the whim of local
politicians and is thus difficult to get correct for all locales.  In
this implementation, the standard C library function localtime() is
used to assist in the calculation of local time.
Note that localtime() is not
threadsafe, so use of the &quot;localtime&quot; modifier is not threadsafe.
Also, the localtime() C function normally only works for years between
1970 and 2037.  For dates outside this range, SQLite attempts to
map the year into an equivalent year within this range, do the
calculation, then map the year back.

<p><i>Please surround uses of localtime() with sqliteOsEnterMutex() and sqliteOsLeaveMutex() so threads
using SQLite are protected, at least!
-- e</i>  It is so. --drh

<p><i>[Consider instead, using localtime_r which is reentrant and may be used
*without* expensive mutex locking. Although non-standard it's available
on most Unixes --hauk]</i> But it is not available on windows, as far as I
am aware. --drh On windows localtime() is thread-safe if the MT C runtime is used. The MT runtime uses thread-local storage for the static variables, the kind functions use.--gr <i>[What about using localtime_r, and on systems where it
is unavailable defining it as sqliteOsEnterMutext() ; locatime() ; sqliteOsLeaveMutex()
so that non-windows systems get the maximum advantage, with almost zero
code impact?]</i> The autoconfigury and patch for localtime_r is here: <font color="#a0a0a0">&curren;</font><a href="http://www.sqlite.org/cvstrac/tktview?tn=1906">http://www.sqlite.org/cvstrac/tktview?tn=1906</a> . I'm curious why this obvious fix is not applied. gmtime() also suffers from this same threadsafety problem.

<p>Date computations do not give correct results for dates before Julian
day number 0 (-4713-11-24 12:00:00).

<p>All internal computations assume the Gregorian calendar system.

<p><hr>
<i>An anonymous user adds:</i> <br>

For my use I added new functions and functionalities to the date functions that
come with the sqlite 3.3.0 (can be used in older versions as well with small effort).

<p>In main lines they are as follows:

<p><ol>
<li>NNN days
<li>NNN hours
<li>NNN minutes
<li>NNN.NNNN seconds
<li>NNN months  (see <a href="tktview?tn=551">#551</a>
 and <a href="chngview?cn=1163">[1163]</a>
)
<li>NNN years  (see <a href="tktview?tn=551">#551</a>
 and <a href="chngview?cn=1163">[1163]</a>
)
<li>start of month
<li>start of year
<li>start of week  (!!! implemented)
<li>start of day
<li>weekday N  (see <a href="tktview?tn=551">#551</a>
 and <a href="chngview?cn=1163">[1163]</a>
)
<li>unixepoch
<li>localtime
<li>utc
<li>julian  (not implemented as of 2004-01-05)
<li>gregorian  (not implemented as of 2004-01-05)
<li>start of minute
<li>start of hour
<li>end of minute
<li>end of hour
<li>end of day
<li>end of week
<li>end of month
<li>end of year
<li>group seconds by
<li>group minutes by
<li>group hours by
<li>group days by
<li>group weeks by
<li>group months by
<li>group years by
</ol>

<p>The &quot;start of&quot; modifiers (7 through 10 and 17 through 18) shift the date backwards to the beginning of the current minute, hour, week, month, year or day.

<p>The &quot;end of&quot; modifiers (19 through 24) shift the date forwards to
the end of the current minute, hour, week, month, year or day.

<p>The &quot;group * by&quot; modifiers (25 through 31) round the date to the closest backward multiple supplied, with some limitations, to the current seconds (1 through 30), minutes (1 through 30), hours (1 through 12), days (1 through 15), weeks (1 through 26), months (1 through 6), years (1 through 100), these limitations are due to dont complicate the calculations when a multiple can span beyound the unit modified.

<p>Ex:

<p>SELECT datetime('2006-02-04 20:09:23','group hours by 3'); =&gt; '2006-02-04 18:00:00'

<p>SELECT datetime('2006-02-05 20:09:23','group days by 3'); =&gt; '2006-02-04 00:00:00'

<p>New functions &quot;week_number(date)&quot; returns the week number of the year on the supplied date parameter, &quot;datetime2seconds(datetime)&quot; return the number of seconds from the supplied datetime parameter.
      <hr>
      <div id="footer">
        <p>
          &nbsp;</p>
        <p>
        </p>
      </div>
    </div>
    </div>
  </body>
</html>

Changes to Doc/Extra/lang_delete.html.

56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
      <h1 class="heading">
        SQL As Understood By SQLite</h1>
      <h4>
        DELETE</h4>
      <p>
        <table cellpadding="10">
          <tr>
            <td align="right" valign="top">
              <i><font color="#ff3434">sql-statement</font></i> ::=</td>
            <td>
              <b><font color="#2c2cf0">DELETE FROM </font></b>[<b><font color="#2c2cf0"></font></b><i><font
                color="#ff3434">database-name</font></i><b><font color="#2c2cf0"> <big>.</big></font></b>]<b><font
                  color="#2c2cf0"> </font></b><i><font color="#ff3434">table-name</font></i><b><font
                    color="#2c2cf0"> </font></b>[<b><font color="#2c2cf0">WHERE </font></b><i><font color="#ff3434">
                      expr</font></i><b><font color="#2c2cf0"></font></b>]<b><font color="#2c2cf0"></font></b></td>







|







56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
      <h1 class="heading">
        SQL As Understood By SQLite</h1>
      <h4>
        DELETE</h4>
      <p>
        <table cellpadding="10">
          <tr>
            <td align="right" width="1%" nowrap>
              <i><font color="#ff3434">sql-statement</font></i> ::=</td>
            <td>
              <b><font color="#2c2cf0">DELETE FROM </font></b>[<b><font color="#2c2cf0"></font></b><i><font
                color="#ff3434">database-name</font></i><b><font color="#2c2cf0"> <big>.</big></font></b>]<b><font
                  color="#2c2cf0"> </font></b><i><font color="#ff3434">table-name</font></i><b><font
                    color="#2c2cf0"> </font></b>[<b><font color="#2c2cf0">WHERE </font></b><i><font color="#ff3434">
                      expr</font></i><b><font color="#2c2cf0"></font></b>]<b><font color="#2c2cf0"></font></b></td>

Changes to Doc/Extra/lang_detach.html.

56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
      <h1 class="heading">
        SQL As Understood By SQLite</h1>
      <h4>
        DETACH</h4>
      <p>
        <table cellpadding="10">
          <tr>
            <td align="right" valign="top">
              <i><font color="#ff3434">sql-command</font></i> ::=</td>
            <td>
              <b><font color="#2c2cf0">DETACH </font></b>[<b><font color="#2c2cf0">DATABASE</font></b>]<b><font
                color="#2c2cf0"> </font></b><i><font color="#ff3434">database-name</font></i><b><font
                  color="#2c2cf0"></font></b></td>
          </tr>
        </table>







|







56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
      <h1 class="heading">
        SQL As Understood By SQLite</h1>
      <h4>
        DETACH</h4>
      <p>
        <table cellpadding="10">
          <tr>
            <td align="right" width="1%" nowrap>
              <i><font color="#ff3434">sql-command</font></i> ::=</td>
            <td>
              <b><font color="#2c2cf0">DETACH </font></b>[<b><font color="#2c2cf0">DATABASE</font></b>]<b><font
                color="#2c2cf0"> </font></b><i><font color="#ff3434">database-name</font></i><b><font
                  color="#2c2cf0"></font></b></td>
          </tr>
        </table>

Changes to Doc/Extra/lang_dropindex.html.

56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
      <h1 class="heading">
        SQL As Understood By SQLite</h1>
      <h4>
        DROP INDEX</h4>
      <p>
        <table cellpadding="10">
          <tr>
            <td align="right" valign="top">
              <i><font color="#ff3434">sql-command</font></i> ::=</td>
            <td>
              <b><font color="#2c2cf0">DROP INDEX </font></b>[<b><font color="#2c2cf0">IF EXISTS</font></b>]<b><font
                color="#2c2cf0"> </font></b>[<b><font color="#2c2cf0"></font></b><i><font color="#ff3434">database-name</font></i><b><font
                  color="#2c2cf0"> <big>.</big></font></b>]<b><font color="#2c2cf0"> </font></b>
              <i><font color="#ff3434">index-name</font></i><b><font color="#2c2cf0"></font></b></td>
          </tr>







|







56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
      <h1 class="heading">
        SQL As Understood By SQLite</h1>
      <h4>
        DROP INDEX</h4>
      <p>
        <table cellpadding="10">
          <tr>
            <td align="right" width="1%" nowrap>
              <i><font color="#ff3434">sql-command</font></i> ::=</td>
            <td>
              <b><font color="#2c2cf0">DROP INDEX </font></b>[<b><font color="#2c2cf0">IF EXISTS</font></b>]<b><font
                color="#2c2cf0"> </font></b>[<b><font color="#2c2cf0"></font></b><i><font color="#ff3434">database-name</font></i><b><font
                  color="#2c2cf0"> <big>.</big></font></b>]<b><font color="#2c2cf0"> </font></b>
              <i><font color="#ff3434">index-name</font></i><b><font color="#2c2cf0"></font></b></td>
          </tr>

Changes to Doc/Extra/lang_droptable.html.

56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
      <h1 class="heading">
        SQL As Understood By SQLite</h1>
      <h4>
        DROP TABLE</h4>
      <p>
        <table cellpadding="10">
          <tr>
            <td align="right" valign="top">
              <i><font color="#ff3434">sql-command</font></i> ::=</td>
            <td>
              <b><font color="#2c2cf0">DROP TABLE </font></b>[<b><font color="#2c2cf0">IF EXISTS</font></b>]<b><font
                color="#2c2cf0"> </font></b>[<b><font color="#2c2cf0"></font></b><i><font color="#ff3434">database-name</font></i><b><font
                  color="#2c2cf0"><big>.</big></font></b>]<b><font color="#2c2cf0"> </font></b>
              <i><font color="#ff3434">table-name</font></i><b><font color="#2c2cf0"></font></b></td>
          </tr>







|







56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
      <h1 class="heading">
        SQL As Understood By SQLite</h1>
      <h4>
        DROP TABLE</h4>
      <p>
        <table cellpadding="10">
          <tr>
            <td align="right" width="1%" nowrap>
              <i><font color="#ff3434">sql-command</font></i> ::=</td>
            <td>
              <b><font color="#2c2cf0">DROP TABLE </font></b>[<b><font color="#2c2cf0">IF EXISTS</font></b>]<b><font
                color="#2c2cf0"> </font></b>[<b><font color="#2c2cf0"></font></b><i><font color="#ff3434">database-name</font></i><b><font
                  color="#2c2cf0"><big>.</big></font></b>]<b><font color="#2c2cf0"> </font></b>
              <i><font color="#ff3434">table-name</font></i><b><font color="#2c2cf0"></font></b></td>
          </tr>

Changes to Doc/Extra/lang_droptrigger.html.

56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
      <h1 class="heading">
        SQL As Understood By SQLite</h1>
      <h4>
        DROP TRIGGER</h4>
      <p>
        <table cellpadding="10">
          <tr>
            <td align="right" valign="top">
              <i><font color="#ff3434">sql-statement</font></i> ::=</td>
            <td>
              <b><font color="#2c2cf0">DROP TRIGGER </font></b>[<b><font color="#2c2cf0"></font></b><i><font
                color="#ff3434">database-name</font></i><b><font color="#2c2cf0"> <big>.</big></font></b>]<b><font
                  color="#2c2cf0"> </font></b><i><font color="#ff3434">trigger-name</font></i><b><font
                    color="#2c2cf0"></font></b></td>
          </tr>







|







56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
      <h1 class="heading">
        SQL As Understood By SQLite</h1>
      <h4>
        DROP TRIGGER</h4>
      <p>
        <table cellpadding="10">
          <tr>
            <td align="right" width="1%" nowrap>
              <i><font color="#ff3434">sql-statement</font></i> ::=</td>
            <td>
              <b><font color="#2c2cf0">DROP TRIGGER </font></b>[<b><font color="#2c2cf0"></font></b><i><font
                color="#ff3434">database-name</font></i><b><font color="#2c2cf0"> <big>.</big></font></b>]<b><font
                  color="#2c2cf0"> </font></b><i><font color="#ff3434">trigger-name</font></i><b><font
                    color="#2c2cf0"></font></b></td>
          </tr>

Changes to Doc/Extra/lang_dropview.html.

56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
      <h1 class="heading">
        SQL As Understood By SQLite</h1>
      <h4>
        DROP VIEW</h4>
      <p>
        <table cellpadding="10">
          <tr>
            <td align="right" valign="top">
              <i><font color="#ff3434">sql-command</font></i> ::=</td>
            <td>
              <b><font color="#2c2cf0">DROP VIEW </font></b><i><font color="#ff3434">view-name</font></i><b><font
                color="#2c2cf0"></font></b></td>
          </tr>
        </table>
      </p>







|







56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
      <h1 class="heading">
        SQL As Understood By SQLite</h1>
      <h4>
        DROP VIEW</h4>
      <p>
        <table cellpadding="10">
          <tr>
            <td align="right" width="1%" nowrap>
              <i><font color="#ff3434">sql-command</font></i> ::=</td>
            <td>
              <b><font color="#2c2cf0">DROP VIEW </font></b><i><font color="#ff3434">view-name</font></i><b><font
                color="#2c2cf0"></font></b></td>
          </tr>
        </table>
      </p>

Changes to Doc/Extra/lang_explain.html.

56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
      <h1 class="heading">
        SQL As Understood By SQLite</h1>
      <h4>
        EXPLAIN</h4>
      <p>
        <table cellpadding="10">
          <tr>
            <td align="right" valign="top">
              <i><font color="#ff3434">sql-statement</font></i> ::=</td>
            <td>
              <b><font color="#2c2cf0">EXPLAIN </font></b><i><font color="#ff3434">sql-statement</font></i><b><font
                color="#2c2cf0"></font></b></td>
          </tr>
        </table>
      </p>







|







56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
      <h1 class="heading">
        SQL As Understood By SQLite</h1>
      <h4>
        EXPLAIN</h4>
      <p>
        <table cellpadding="10">
          <tr>
            <td align="right" width="1%" nowrap>
              <i><font color="#ff3434">sql-statement</font></i> ::=</td>
            <td>
              <b><font color="#2c2cf0">EXPLAIN </font></b><i><font color="#ff3434">sql-statement</font></i><b><font
                color="#2c2cf0"></font></b></td>
          </tr>
        </table>
      </p>

Changes to Doc/Extra/lang_expr.html.

56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
...
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
...
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
...
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
...
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
...
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
...
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
      <h1 class="heading">
        SQL As Understood By SQLite</h1>
      <h4>
        expression</h4>
      <p>
        <table cellpadding="10">
          <tr>
            <td align="right" valign="top">
              <i><font color="#ff3434">expr</font></i> ::=</td>
            <td>
              <b><font color="#2c2cf0"></font></b><i><font color="#ff3434">expr</font></i><b><font
                color="#2c2cf0"> </font></b><i><font color="#ff3434">binary-op</font></i><b><font
                  color="#2c2cf0"> </font></b><i><font color="#ff3434">expr</font></i><b><font color="#2c2cf0">
                  </font></b><big>|</big><b><font color="#2c2cf0"><br />
                  </font></b><i><font color="#ff3434">expr</font></i><b><font color="#2c2cf0"> </font>
................................................................................
                          </b><i><font color="#ff3434">expr</font></i><b><font color="#2c2cf0"></font></b>]<b><font
                            color="#2c2cf0"> END </font></b><big>|</big><b><font color="#2c2cf0"><br />
                              CAST <big>(</big> </font></b><i><font color="#ff3434">expr</font></i><b><font color="#2c2cf0">
                                AS </font></b><i><font color="#ff3434">type</font></i><b><font color="#2c2cf0"> <big>
                                  )</big></font></b></td>
          </tr>
          <tr>
            <td align="right" valign="top">
              <i><font color="#ff3434">like-op</font></i> ::=</td>
            <td>
              <b><font color="#2c2cf0">LIKE </font></b><big>|</big><b><font color="#2c2cf0"> GLOB
              </font></b><big>|</big><b><font color="#2c2cf0"> REGEXP </font></b><big>|</big><b><font
                color="#2c2cf0"> MATCH</font></b></td>
          </tr>
        </table>
................................................................................
        This section is different from the others. Most other sections of this document
        talks about a particular SQL command. This section does not talk about a standalone
        command but about "expressions" which are subcomponents of most other commands.</p>
      <p>
        SQLite understands the following binary operators, in order from highest to lowest
        precedence:</p>
      <blockquote>
        <pre>
<font color="#2c2cf0"><big>|| * / % + - &lt;&lt; &gt;&gt; &amp; | &lt; &lt;= &gt;
  &gt;= = == != &lt;&gt; </big>IN AND OR</font>
</pre>
      </blockquote>
      <p>
        Supported unary operators are these:</p>
      <blockquote>
        <pre>
<font color="#2c2cf0"><big>- + ! ~ NOT</big></font>
</pre>
      </blockquote>
      <p>
        The unary operator [Operator +] is a no-op. It can be applied to strings, numbers,
        or blobs and it always gives as its result the value of the operand.</p>
      <p>
        Note that there are two variations of the equals and not equals operators. Equals
................................................................................
        would result in syntactic ambiguity. A string constant is formed by enclosing the
        string in single quotes ('). A single quote within the string can be encoded by
        putting two single quotes in a row - as in Pascal. C-style escapes using the backslash
        character are not supported because they are not standard SQL. BLOB literals are
        string literals containing hexadecimal data and preceded by a single "x" or "X"
        character. For example:</p>
      <blockquote>
        <pre>
X'53514697465'
</pre>
      </blockquote>
      <p>
        A literal value can also be the token "NULL".
      </p>
      <p>
        A parameter specifies a placeholder in the expression for a literal value that is
        filled in at runtime using the <a href="capi3ref.html#sqlite3_bind_int">sqlite3_bind</a>
        API. Parameters can take several forms:
      </p>
      <p>
        <table>
          <tr>
            <td align="right" valign="top">
              <b>?</b><i>NNN</i></td>
            <td width="20">
            </td>
            <td>
              A question mark followed by a number <i>NNN</i> holds a spot for the NNN-th parameter.
              NNN must be between 1 and 999.</td>
          </tr>
          <tr>
            <td align="right" valign="top">
              <b>?</b></td>
            <td width="20">
            </td>
            <td>
              A question mark that is not followed by a number holds a spot for the next unused
              parameter.</td>
          </tr>
          <tr>
            <td align="right" valign="top">
              <b>:</b><i>AAAA</i></td>
            <td width="20">
            </td>
            <td>
              A colon followed by an identifier name holds a spot for a named parameter with the
              name AAAA. Named parameters are also numbered. The number assigned is the next unused
              number. To avoid confusion, it is best to avoid mixing named and numbered parameters.</td>
          </tr>
          <tr>
            <td align="right" valign="top">
              <b>@</b><i>AAAA</i></td>
            <td width="20">
            </td>
            <td>
              An "at" sign works exactly like a colon.</td>
          </tr>
          <tr>
            <td align="right" valign="top">
              <b>$</b><i>AAAA</i></td>
            <td width="20">
            </td>
            <td>
              A dollar-sign followed by an identifier name also holds a spot for a named parameter
              with the name AAAA. The identifier name in this case can include one or more occurances
              of "::" and a suffix enclosed in "(...)" containing any text at all. This syntax
................................................................................
          <tr>
            <td align="right" valign="top" width="120">
              abs(<i>X</i>)</td>
            <td valign="top">
              Return the absolute value of argument <i>X</i>.</td>
          </tr>
          <tr>
            <td align="right" valign="top">
              coalesce(<i>X</i>,<i>Y</i>,...)</td>
            <td valign="top">
              Return a copy of the first non-NULL argument. If all arguments are NULL then NULL
              is returned. There must be at least 2 arguments.</td>
          </tr>
          <tr>
            <a name="globFunc"></a>
            <td align="right" valign="top">
              glob(<i>X</i>,<i>Y</i>)</td>
            <td valign="top">
              This function is used to implement the "<b>X GLOB Y</b>" syntax of SQLite. The <a
                href="capi3ref.html#sqlite3_create_function">sqlite3_create_function()</a> interface
              can be used to override this function and thereby change the operation of the <a
                href="#globFunc">GLOB</a> operator.</td>
          </tr>
          <tr>
            <td align="right" valign="top">
              ifnull(<i>X</i>,<i>Y</i>)</td>
            <td valign="top">
              Return a copy of the first non-NULL argument. If both arguments are NULL then NULL
              is returned. This behaves the same as <b>coalesce()</b> above.</td>
          </tr>
          <tr>
            <td align="right" valign="top">
              last_insert_rowid()</td>
            <td valign="top">
              Return the ROWID of the last row insert from this connection to the database. This
              is the same value that would be returned from the <b>sqlite_last_insert_rowid()</b>
              API function.</td>
          </tr>
          <tr>
            <td align="right" valign="top">
              length(<i>X</i>)</td>
            <td valign="top">
              Return the string length of <i>X</i> in characters. If SQLite is configured to support
              UTF-8, then the number of UTF-8 characters is returned, not the number of bytes.</td>
          </tr>
          <tr>
            <a name="likeFunc"></a>
            <td align="right" valign="top">
              like(<i>X</i>,<i>Y</i> [,<i>Z</i>])</td>
            <td valign="top">
              This function is used to implement the "<b>X LIKE Y [ESCAPE Z]</b>" syntax of SQL.
              If the optional ESCAPE clause is present, then the user-function is invoked with
              three arguments. Otherwise, it is invoked with two arguments only. The <a href="capi3ref.html#sqlite3_create_function">
                sqlite_create_function()</a> interface can be used to override this function and
              thereby change the operation of the <a href="#like">LIKE</a> operator. When doing
              this, it may be important to override both the two and three argument versions of
              the like() function. Otherwise, different code may be called to implement the LIKE
              operator depending on whether or not an ESCAPE clause was specified.</td>
          </tr>
          <tr>
            <td align="right" valign="top">
              load_extension(<i>X</i>)<br />
              load_extension(<i>X</i>,<i>Y</i>)</td>
            <td valign="top">
              Load SQLite extensions out of the shared library file named <i>X</i> using the entry
              point <i>Y</i>. The result is a NULL. If <i>Y</i> is omitted then the default entry
              point of <b>sqlite3_extension_init</b> is used. This function raises an exception
              if the extension fails to load or initialize correctly.
            </td>
          </tr>
          <tr>
            <td align="right" valign="top">
              lower(<i>X</i>)</td>
            <td valign="top">
              Return a copy of string <i>X</i> will all characters converted to lower case. The
              C library <b>tolower()</b> routine is used for the conversion, which means that
              this function might not work correctly on UTF-8 characters.</td>
          </tr>
          <tr>
            <td align="right" valign="top">
              max(<i>X</i>,<i>Y</i>,...)</td>
            <td valign="top">
              Return the argument with the maximum value. Arguments may be strings in addition
              to numbers. The maximum value is determined by the usual sort order. Note that <b>
                max()</b> is a simple function when it has 2 or more arguments but converts to
              an aggregate function if given only a single argument.</td>
          </tr>
          <tr>
            <td align="right" valign="top">
              min(<i>X</i>,<i>Y</i>,...)</td>
            <td valign="top">
              Return the argument with the minimum value. Arguments may be strings in addition
              to numbers. The minimum value is determined by the usual sort order. Note that <b>
                min()</b> is a simple function when it has 2 or more arguments but converts to
              an aggregate function if given only a single argument.</td>
          </tr>
          <tr>
            <td align="right" valign="top">
              nullif(<i>X</i>,<i>Y</i>)</td>
            <td valign="top">
              Return the first argument if the arguments are different, otherwise return NULL.</td>
          </tr>
          <tr>
            <td align="right" valign="top">
              quote(<i>X</i>)</td>
            <td valign="top">
              This routine returns a string which is the value of its argument suitable for inclusion
              into another SQL statement. Strings are surrounded by single-quotes with escapes
              on interior quotes as needed. BLOBs are encoded as hexadecimal literals. The current
              implementation of
          VACUUM uses this function. The function is also useful when writing
              triggers to implement undo/redo functionality.
            </td>
          </tr>
          <tr>
            <td align="right" valign="top">
              random(*)</td>
            <td valign="top">
              Return a pseudo-random integer between -9223372036854775808 and +9223372036854775807.</td>
          </tr>
          <tr>
            <td align="right" valign="top">
              round(<i>X</i>)<br />
              round(<i>X</i>,<i>Y</i>)</td>
            <td valign="top">
              Round off the number <i>X</i> to <i>Y</i> digits to the right of the decimal point.
              If the <i>Y</i> argument is omitted, 0 is assumed.</td>
          </tr>
          <tr>
            <td align="right" valign="top">
              soundex(<i>X</i>)</td>
            <td valign="top">
              Compute the soundex encoding of the string <i>X</i>. The string "?000" is returned
              if the argument is NULL. This function is omitted from SQLite by default. It is
              only available the -DSQLITE_SOUNDEX=1 compiler option is used when SQLite is built.</td>
          </tr>
          <tr>
            <td align="right" valign="top">
              sqlite_version(*)</td>
            <td valign="top">
              Return the version string for the SQLite library that is running. Example: "2.8.0"</td>
          </tr>
          <tr>
            <td align="right" valign="top">
              substr(<i>X</i>,<i>Y</i>,<i>Z</i>)</td>
            <td valign="top">
              Return a substring of input string <i>X</i> that begins with the <i>Y</i>-th character
              and which is <i>Z</i> characters long. The left-most character of <i>X</i> is number
              1. If <i>Y</i> is negative the the first character of the substring is found by
              counting from the right rather than the left. If SQLite is configured to support
              UTF-8, then characters indices refer to actual UTF-8 characters, not bytes.</td>
          </tr>
          <tr>
            <td align="right" valign="top">
              typeof(<i>X</i>)</td>
            <td valign="top">
              Return the type of the expression <i>X</i>. The only return values are "null", "integer",
              "real", "text", and "blob".
        SQLite's type handling is explained in <a href="http://www.sqlite.org/datatype3.html">
                Datatypes in SQLite Version 3</a>.</td>
          </tr>
          <tr>
            <td align="right" valign="top">
              upper(<i>X</i>)</td>
            <td valign="top">
              Return a copy of input string <i>X</i> converted to all upper-case letters. The
              implementation of this function uses the C library routine <b>toupper()</b> which
              means it may not work correctly on UTF-8 strings.</td>
          </tr>
        </table>
        <b>Date And Time Functions</b>
      </p>
      <p>
        Date and time functions are documented in the <a href="http://www.sqlite.org/cvstrac/wiki?p=DateAndTimeFunctions">
          SQLite Wiki</a>.</p>
      <p>
        <a name="aggregatefunctions"></a><b>Aggregate Functions</b>
      </p>
      <p>
        The aggregate functions shown below are available by default. Additional aggregate
        functions written in C may be added using the <a href="capi3ref.html#sqlite3_create_function">
          sqlite3_create_function()</a> API.</p>
      <p>
................................................................................
              values that do not look like numbers are interpreted as 0. The result of avg() is
              always a floating point value even if all inputs are integers.
              <p>
              </p>
            </td>
          </tr>
          <tr>
            <td align="right" valign="top">
              count(<i>X</i>)<br />
              count(*)</td>
            <td valign="top">
              The first form return a count of the number of times that <i>X</i> is not NULL in
              a group. The second form (with no argument) returns the total number of rows in
              the group.</td>
          </tr>
          <tr>
            <td align="right" valign="top">
              max(<i>X</i>)</td>
            <td valign="top">
              Return the maximum value of all values in the group. The usual sort order is used
              to determine the maximum.</td>
          </tr>
          <tr>
            <td align="right" valign="top">
              min(<i>X</i>)</td>
            <td valign="top">
              Return the minimum non-NULL value of all values in the group. The usual sort order
              is used to determine the minimum. NULL is only returned if all values in the group
              are NULL.</td>
          </tr>
          <tr>
            <td align="right" valign="top">
              sum(<i>X</i>)<br />
              total(<i>X</i>)</td>
            <td valign="top">
              Return the numeric sum of all non-NULL values in the group. If there are no non-NULL
              input rows then sum() returns NULL but total() returns 0.0. NULL is not normally
              a helpful result for the sum of no rows but the SQL standard requires it and most
              other SQL database engines implement sum() that way so SQLite does it in the same
................................................................................
                Sum() will throw an "integer overflow" exception if all inputs are integers or NULL
                and an integer overflow occurs at any point during the computation. Total() never
                throws an exception.</p>
            </td>
          </tr>
        </table>
      </p>
      <p>
      <hr>
        &nbsp;</p>
      <div id="footer">
        <p>
          &nbsp;</p>
        <p>
        </p>
      </div>
    </div>
    </div>
  </body>
</html>







|







 







|







 







<
|






<
|







 







<
|













|








|








|









|







|







 







|







|








|






|







|







|












|










|







|








|








|





|











|





|







|







|





|









|








|







<


<
<
<







 







|








|






|







|







 







<

<










56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
...
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
...
147
148
149
150
151
152
153

154
155
156
157
158
159
160

161
162
163
164
165
166
167
168
...
183
184
185
186
187
188
189

190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
...
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530

531
532



533
534
535
536
537
538
539
...
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
...
602
603
604
605
606
607
608

609

610
611
612
613
614
615
616
617
618
619
      <h1 class="heading">
        SQL As Understood By SQLite</h1>
      <h4>
        expression</h4>
      <p>
        <table cellpadding="10">
          <tr>
            <td align="right" width="1%" nowrap>
              <i><font color="#ff3434">expr</font></i> ::=</td>
            <td>
              <b><font color="#2c2cf0"></font></b><i><font color="#ff3434">expr</font></i><b><font
                color="#2c2cf0"> </font></b><i><font color="#ff3434">binary-op</font></i><b><font
                  color="#2c2cf0"> </font></b><i><font color="#ff3434">expr</font></i><b><font color="#2c2cf0">
                  </font></b><big>|</big><b><font color="#2c2cf0"><br />
                  </font></b><i><font color="#ff3434">expr</font></i><b><font color="#2c2cf0"> </font>
................................................................................
                          </b><i><font color="#ff3434">expr</font></i><b><font color="#2c2cf0"></font></b>]<b><font
                            color="#2c2cf0"> END </font></b><big>|</big><b><font color="#2c2cf0"><br />
                              CAST <big>(</big> </font></b><i><font color="#ff3434">expr</font></i><b><font color="#2c2cf0">
                                AS </font></b><i><font color="#ff3434">type</font></i><b><font color="#2c2cf0"> <big>
                                  )</big></font></b></td>
          </tr>
          <tr>
            <td align="right" width="1%" nowrap>
              <i><font color="#ff3434">like-op</font></i> ::=</td>
            <td>
              <b><font color="#2c2cf0">LIKE </font></b><big>|</big><b><font color="#2c2cf0"> GLOB
              </font></b><big>|</big><b><font color="#2c2cf0"> REGEXP </font></b><big>|</big><b><font
                color="#2c2cf0"> MATCH</font></b></td>
          </tr>
        </table>
................................................................................
        This section is different from the others. Most other sections of this document
        talks about a particular SQL command. This section does not talk about a standalone
        command but about "expressions" which are subcomponents of most other commands.</p>
      <p>
        SQLite understands the following binary operators, in order from highest to lowest
        precedence:</p>
      <blockquote>

        <pre><font color="#2c2cf0"><big>|| * / % + - &lt;&lt; &gt;&gt; &amp; | &lt; &lt;= &gt;
  &gt;= = == != &lt;&gt; </big>IN AND OR</font>
</pre>
      </blockquote>
      <p>
        Supported unary operators are these:</p>
      <blockquote>

        <pre><font color="#2c2cf0"><big>- + ! ~ NOT</big></font>
</pre>
      </blockquote>
      <p>
        The unary operator [Operator +] is a no-op. It can be applied to strings, numbers,
        or blobs and it always gives as its result the value of the operand.</p>
      <p>
        Note that there are two variations of the equals and not equals operators. Equals
................................................................................
        would result in syntactic ambiguity. A string constant is formed by enclosing the
        string in single quotes ('). A single quote within the string can be encoded by
        putting two single quotes in a row - as in Pascal. C-style escapes using the backslash
        character are not supported because they are not standard SQL. BLOB literals are
        string literals containing hexadecimal data and preceded by a single "x" or "X"
        character. For example:</p>
      <blockquote>

        <pre>X'53514697465'
</pre>
      </blockquote>
      <p>
        A literal value can also be the token "NULL".
      </p>
      <p>
        A parameter specifies a placeholder in the expression for a literal value that is
        filled in at runtime using the <a href="capi3ref.html#sqlite3_bind_int">sqlite3_bind</a>
        API. Parameters can take several forms:
      </p>
      <p>
        <table>
          <tr>
            <td align="right" width="1%" nowrap>
              <b>?</b><i>NNN</i></td>
            <td width="20">
            </td>
            <td>
              A question mark followed by a number <i>NNN</i> holds a spot for the NNN-th parameter.
              NNN must be between 1 and 999.</td>
          </tr>
          <tr>
            <td align="right" width="1%" nowrap>
              <b>?</b></td>
            <td width="20">
            </td>
            <td>
              A question mark that is not followed by a number holds a spot for the next unused
              parameter.</td>
          </tr>
          <tr>
            <td align="right" width="1%" nowrap>
              <b>:</b><i>AAAA</i></td>
            <td width="20">
            </td>
            <td>
              A colon followed by an identifier name holds a spot for a named parameter with the
              name AAAA. Named parameters are also numbered. The number assigned is the next unused
              number. To avoid confusion, it is best to avoid mixing named and numbered parameters.</td>
          </tr>
          <tr>
            <td align="right" width="1%" nowrap>
              <b>@</b><i>AAAA</i></td>
            <td width="20">
            </td>
            <td>
              An "at" sign works exactly like a colon.</td>
          </tr>
          <tr>
            <td align="right" width="1%" nowrap>
              <b>$</b><i>AAAA</i></td>
            <td width="20">
            </td>
            <td>
              A dollar-sign followed by an identifier name also holds a spot for a named parameter
              with the name AAAA. The identifier name in this case can include one or more occurances
              of "::" and a suffix enclosed in "(...)" containing any text at all. This syntax
................................................................................
          <tr>
            <td align="right" valign="top" width="120">
              abs(<i>X</i>)</td>
            <td valign="top">
              Return the absolute value of argument <i>X</i>.</td>
          </tr>
          <tr>
            <td align="right" width="1%" nowrap>
              coalesce(<i>X</i>,<i>Y</i>,...)</td>
            <td valign="top">
              Return a copy of the first non-NULL argument. If all arguments are NULL then NULL
              is returned. There must be at least 2 arguments.</td>
          </tr>
          <tr>
            <a name="globFunc"></a>
            <td align="right" width="1%" nowrap>
              glob(<i>X</i>,<i>Y</i>)</td>
            <td valign="top">
              This function is used to implement the "<b>X GLOB Y</b>" syntax of SQLite. The <a
                href="capi3ref.html#sqlite3_create_function">sqlite3_create_function()</a> interface
              can be used to override this function and thereby change the operation of the <a
                href="#globFunc">GLOB</a> operator.</td>
          </tr>
          <tr>
            <td align="right" width="1%" nowrap>
              ifnull(<i>X</i>,<i>Y</i>)</td>
            <td valign="top">
              Return a copy of the first non-NULL argument. If both arguments are NULL then NULL
              is returned. This behaves the same as <b>coalesce()</b> above.</td>
          </tr>
          <tr>
            <td align="right" width="1%" nowrap>
              last_insert_rowid()</td>
            <td valign="top">
              Return the ROWID of the last row insert from this connection to the database. This
              is the same value that would be returned from the <b>sqlite_last_insert_rowid()</b>
              API function.</td>
          </tr>
          <tr>
            <td align="right" width="1%" nowrap>
              length(<i>X</i>)</td>
            <td valign="top">
              Return the string length of <i>X</i> in characters. If SQLite is configured to support
              UTF-8, then the number of UTF-8 characters is returned, not the number of bytes.</td>
          </tr>
          <tr>
            <a name="likeFunc"></a>
            <td align="right" width="1%" nowrap>
              like(<i>X</i>,<i>Y</i> [,<i>Z</i>])</td>
            <td valign="top">
              This function is used to implement the "<b>X LIKE Y [ESCAPE Z]</b>" syntax of SQL.
              If the optional ESCAPE clause is present, then the user-function is invoked with
              three arguments. Otherwise, it is invoked with two arguments only. The <a href="capi3ref.html#sqlite3_create_function">
                sqlite_create_function()</a> interface can be used to override this function and
              thereby change the operation of the <a href="#like">LIKE</a> operator. When doing
              this, it may be important to override both the two and three argument versions of
              the like() function. Otherwise, different code may be called to implement the LIKE
              operator depending on whether or not an ESCAPE clause was specified.</td>
          </tr>
          <tr>
            <td align="right" width="1%" nowrap>
              load_extension(<i>X</i>)<br />
              load_extension(<i>X</i>,<i>Y</i>)</td>
            <td valign="top">
              Load SQLite extensions out of the shared library file named <i>X</i> using the entry
              point <i>Y</i>. The result is a NULL. If <i>Y</i> is omitted then the default entry
              point of <b>sqlite3_extension_init</b> is used. This function raises an exception
              if the extension fails to load or initialize correctly.
            </td>
          </tr>
          <tr>
            <td align="right" width="1%" nowrap>
              lower(<i>X</i>)</td>
            <td valign="top">
              Return a copy of string <i>X</i> will all characters converted to lower case. The
              C library <b>tolower()</b> routine is used for the conversion, which means that
              this function might not work correctly on UTF-8 characters.</td>
          </tr>
          <tr>
            <td align="right" width="1%" nowrap>
              max(<i>X</i>,<i>Y</i>,...)</td>
            <td valign="top">
              Return the argument with the maximum value. Arguments may be strings in addition
              to numbers. The maximum value is determined by the usual sort order. Note that <b>
                max()</b> is a simple function when it has 2 or more arguments but converts to
              an aggregate function if given only a single argument.</td>
          </tr>
          <tr>
            <td align="right" width="1%" nowrap>
              min(<i>X</i>,<i>Y</i>,...)</td>
            <td valign="top">
              Return the argument with the minimum value. Arguments may be strings in addition
              to numbers. The minimum value is determined by the usual sort order. Note that <b>
                min()</b> is a simple function when it has 2 or more arguments but converts to
              an aggregate function if given only a single argument.</td>
          </tr>
          <tr>
            <td align="right" width="1%" nowrap>
              nullif(<i>X</i>,<i>Y</i>)</td>
            <td valign="top">
              Return the first argument if the arguments are different, otherwise return NULL.</td>
          </tr>
          <tr>
            <td align="right" width="1%" nowrap>
              quote(<i>X</i>)</td>
            <td valign="top">
              This routine returns a string which is the value of its argument suitable for inclusion
              into another SQL statement. Strings are surrounded by single-quotes with escapes
              on interior quotes as needed. BLOBs are encoded as hexadecimal literals. The current
              implementation of
          VACUUM uses this function. The function is also useful when writing
              triggers to implement undo/redo functionality.
            </td>
          </tr>
          <tr>
            <td align="right" width="1%" nowrap>
              random(*)</td>
            <td valign="top">
              Return a pseudo-random integer between -9223372036854775808 and +9223372036854775807.</td>
          </tr>
          <tr>
            <td align="right" width="1%" nowrap>
              round(<i>X</i>)<br />
              round(<i>X</i>,<i>Y</i>)</td>
            <td valign="top">
              Round off the number <i>X</i> to <i>Y</i> digits to the right of the decimal point.
              If the <i>Y</i> argument is omitted, 0 is assumed.</td>
          </tr>
          <tr>
            <td align="right" width="1%" nowrap>
              soundex(<i>X</i>)</td>
            <td valign="top">
              Compute the soundex encoding of the string <i>X</i>. The string "?000" is returned
              if the argument is NULL. This function is omitted from SQLite by default. It is
              only available the -DSQLITE_SOUNDEX=1 compiler option is used when SQLite is built.</td>
          </tr>
          <tr>
            <td align="right" width="1%" nowrap>
              sqlite_version(*)</td>
            <td valign="top">
              Return the version string for the SQLite library that is running. Example: "2.8.0"</td>
          </tr>
          <tr>
            <td align="right" width="1%" nowrap>
              substr(<i>X</i>,<i>Y</i>,<i>Z</i>)</td>
            <td valign="top">
              Return a substring of input string <i>X</i> that begins with the <i>Y</i>-th character
              and which is <i>Z</i> characters long. The left-most character of <i>X</i> is number
              1. If <i>Y</i> is negative the the first character of the substring is found by
              counting from the right rather than the left. If SQLite is configured to support
              UTF-8, then characters indices refer to actual UTF-8 characters, not bytes.</td>
          </tr>
          <tr>
            <td align="right" width="1%" nowrap>
              typeof(<i>X</i>)</td>
            <td valign="top">
              Return the type of the expression <i>X</i>. The only return values are "null", "integer",
              "real", "text", and "blob".
        SQLite's type handling is explained in <a href="http://www.sqlite.org/datatype3.html">
                Datatypes in SQLite Version 3</a>.</td>
          </tr>
          <tr>
            <td align="right" width="1%" nowrap>
              upper(<i>X</i>)</td>
            <td valign="top">
              Return a copy of input string <i>X</i> converted to all upper-case letters. The
              implementation of this function uses the C library routine <b>toupper()</b> which
              means it may not work correctly on UTF-8 strings.</td>
          </tr>
        </table>

      </p>
      <p>



        <a name="aggregatefunctions"></a><b>Aggregate Functions</b>
      </p>
      <p>
        The aggregate functions shown below are available by default. Additional aggregate
        functions written in C may be added using the <a href="capi3ref.html#sqlite3_create_function">
          sqlite3_create_function()</a> API.</p>
      <p>
................................................................................
              values that do not look like numbers are interpreted as 0. The result of avg() is
              always a floating point value even if all inputs are integers.
              <p>
              </p>
            </td>
          </tr>
          <tr>
            <td align="right" width="1%" nowrap>
              count(<i>X</i>)<br />
              count(*)</td>
            <td valign="top">
              The first form return a count of the number of times that <i>X</i> is not NULL in
              a group. The second form (with no argument) returns the total number of rows in
              the group.</td>
          </tr>
          <tr>
            <td align="right" width="1%" nowrap>
              max(<i>X</i>)</td>
            <td valign="top">
              Return the maximum value of all values in the group. The usual sort order is used
              to determine the maximum.</td>
          </tr>
          <tr>
            <td align="right" width="1%" nowrap>
              min(<i>X</i>)</td>
            <td valign="top">
              Return the minimum non-NULL value of all values in the group. The usual sort order
              is used to determine the minimum. NULL is only returned if all values in the group
              are NULL.</td>
          </tr>
          <tr>
            <td align="right" width="1%" nowrap>
              sum(<i>X</i>)<br />
              total(<i>X</i>)</td>
            <td valign="top">
              Return the numeric sum of all non-NULL values in the group. If there are no non-NULL
              input rows then sum() returns NULL but total() returns 0.0. NULL is not normally
              a helpful result for the sum of no rows but the SQL standard requires it and most
              other SQL database engines implement sum() that way so SQLite does it in the same
................................................................................
                Sum() will throw an "integer overflow" exception if all inputs are integers or NULL
                and an integer overflow occurs at any point during the computation. Total() never
                throws an exception.</p>
            </td>
          </tr>
        </table>
      </p>

      <hr>

      <div id="footer">
        <p>
          &nbsp;</p>
        <p>
        </p>
      </div>
    </div>
    </div>
  </body>
</html>

Changes to Doc/Extra/lang_insert.html.

56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
      <h1 class="heading">
        SQL As Understood By SQLite</h1>
      <h4>
        INSERT</h4>
      <p>
        <table cellpadding="10">
          <tr>
            <td align="right" valign="top">
              <i><font color="#ff3434">sql-statement</font></i> ::=</td>
            <td>
              <b><font color="#2c2cf0">INSERT </font></b>[<b><font color="#2c2cf0">OR </font></b>
              <i><font color="#ff3434">conflict-algorithm</font></i><b><font color="#2c2cf0"></font></b>]<b><font
                color="#2c2cf0"> INTO </font></b>[<b><font color="#2c2cf0"></font></b><i><font color="#ff3434">database-name</font></i><b><font
                  color="#2c2cf0"> <big>.</big></font></b>]<b><font color="#2c2cf0"> </font></b>
              <i><font color="#ff3434">table-name</font></i><b><font color="#2c2cf0"> </font></b>







|







56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
      <h1 class="heading">
        SQL As Understood By SQLite</h1>
      <h4>
        INSERT</h4>
      <p>
        <table cellpadding="10">
          <tr>
            <td align="right" width="1%" nowrap>
              <i><font color="#ff3434">sql-statement</font></i> ::=</td>
            <td>
              <b><font color="#2c2cf0">INSERT </font></b>[<b><font color="#2c2cf0">OR </font></b>
              <i><font color="#ff3434">conflict-algorithm</font></i><b><font color="#2c2cf0"></font></b>]<b><font
                color="#2c2cf0"> INTO </font></b>[<b><font color="#2c2cf0"></font></b><i><font color="#ff3434">database-name</font></i><b><font
                  color="#2c2cf0"> <big>.</big></font></b>]<b><font color="#2c2cf0"> </font></b>
              <i><font color="#ff3434">table-name</font></i><b><font color="#2c2cf0"> </font></b>

Changes to Doc/Extra/lang_reindex.html.

56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
      <h1 class="heading">
        SQL As Understood By SQLite</h1>
      <h4>
        REINDEX</h4>
      <p>
        <table cellpadding="10">
          <tr>
            <td align="right" valign="top">
              <i><font color="#ff3434">sql-statement</font></i> ::=</td>
            <td>
              <b><font color="#2c2cf0">REINDEX </font></b><i><font color="#ff3434">collation
        name</font></i><b><font
                color="#2c2cf0"></font></b></td>
          </tr>
        </table>
        <table cellpadding="10">
          <tr>
            <td align="right" valign="top">
              <i><font color="#ff3434">sql-statement</font></i> ::=</td>
            <td>
              <b><font color="#2c2cf0">REINDEX </font></b>[<b><font color="#2c2cf0"></font></b><i><font
                color="#ff3434">database-name</font></i><b><font color="#2c2cf0"> <big>.</big></font></b>]<b><font
                  color="#2c2cf0"> </font></b><i><font color="#ff3434">table/index-name</font></i><b><font
                    color="#2c2cf0"></font></b></td>
          </tr>







|









|







56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
      <h1 class="heading">
        SQL As Understood By SQLite</h1>
      <h4>
        REINDEX</h4>
      <p>
        <table cellpadding="10">
          <tr>
            <td align="right" width="1%" nowrap>
              <i><font color="#ff3434">sql-statement</font></i> ::=</td>
            <td>
              <b><font color="#2c2cf0">REINDEX </font></b><i><font color="#ff3434">collation
        name</font></i><b><font
                color="#2c2cf0"></font></b></td>
          </tr>
        </table>
        <table cellpadding="10">
          <tr>
            <td align="right" width="1%" nowrap>
              <i><font color="#ff3434">sql-statement</font></i> ::=</td>
            <td>
              <b><font color="#2c2cf0">REINDEX </font></b>[<b><font color="#2c2cf0"></font></b><i><font
                color="#ff3434">database-name</font></i><b><font color="#2c2cf0"> <big>.</big></font></b>]<b><font
                  color="#2c2cf0"> </font></b><i><font color="#ff3434">table/index-name</font></i><b><font
                    color="#2c2cf0"></font></b></td>
          </tr>

Changes to Doc/Extra/lang_replace.html.

56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
      <h1 class="heading">
        SQL As Understood By SQLite</h1>
      <h4>
        REPLACE</h4>
      <p>
        <table cellpadding="10">
          <tr>
            <td align="right" valign="top">
              <i><font color="#ff3434">sql-statement</font></i> ::=</td>
            <td>
              <b><font color="#2c2cf0">REPLACE INTO </font></b>[<b><font color="#2c2cf0"></font></b><i><font
                color="#ff3434">database-name</font></i><b><font color="#2c2cf0"> <big>.</big></font></b>]<b><font
                  color="#2c2cf0"> </font></b><i><font color="#ff3434">table-name</font></i><b><font
                    color="#2c2cf0"> </font></b>[<b><font color="#2c2cf0"><big>(</big> </font></b>
              <i><font color="#ff3434">column-list</font></i><b><font color="#2c2cf0"> <big>)</big></font></b>]<b><font







|







56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
      <h1 class="heading">
        SQL As Understood By SQLite</h1>
      <h4>
        REPLACE</h4>
      <p>
        <table cellpadding="10">
          <tr>
            <td align="right" width="1%" nowrap>
              <i><font color="#ff3434">sql-statement</font></i> ::=</td>
            <td>
              <b><font color="#2c2cf0">REPLACE INTO </font></b>[<b><font color="#2c2cf0"></font></b><i><font
                color="#ff3434">database-name</font></i><b><font color="#2c2cf0"> <big>.</big></font></b>]<b><font
                  color="#2c2cf0"> </font></b><i><font color="#ff3434">table-name</font></i><b><font
                    color="#2c2cf0"> </font></b>[<b><font color="#2c2cf0"><big>(</big> </font></b>
              <i><font color="#ff3434">column-list</font></i><b><font color="#2c2cf0"> <big>)</big></font></b>]<b><font

Changes to Doc/Extra/lang_select.html.

56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
..
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
      <h1 class="heading">
        SQL As Understood By SQLite</h1>
      <h4>
        SELECT</h4>
      <p>
        <table cellpadding="10">
          <tr>
            <td align="right" valign="top">
              <i><font color="#ff3434">sql-statement</font></i> ::=</td>
            <td>
              <b><font color="#2c2cf0">SELECT </font></b>[<b><font color="#2c2cf0">ALL </font></b>
              <big>|</big><b><font color="#2c2cf0"> DISTINCT</font></b>]<b><font color="#2c2cf0">
              </font></b><i><font color="#ff3434">result</font></i><b><font color="#2c2cf0"> </font>
              </b>[<b><font color="#2c2cf0">FROM </font></b><i><font color="#ff3434">table-list</font></i><b><font
                color="#2c2cf0"></font></b>]<b><font color="#2c2cf0"><br />
................................................................................
                            </font></b>[<b><font color="#2c2cf0">LIMIT </font></b><i><font color="#ff3434">integer</font></i><b><font
                              color="#2c2cf0"> </font></b>[<b><font color="#2c2cf0"></font></b>(<b><font color="#2c2cf0">
                                OFFSET </font></b><big>|</big><b><font color="#2c2cf0"> <big>,</big> </font></b>
              )<b><font color="#2c2cf0"> </font></b><i><font color="#ff3434">integer</font></i><b><font
                color="#2c2cf0"></font></b>]<b><font color="#2c2cf0"></font></b>]<b><font color="#2c2cf0"></font></b></td>
          </tr>
          <tr>
            <td align="right" valign="top">
              <i><font color="#ff3434">result</font></i> ::=</td>
            <td>
              <b><font color="#2c2cf0"></font></b><i><font color="#ff3434">result-column</font></i><b><font
                color="#2c2cf0"> </font></b>[<b><font color="#2c2cf0"><big>,</big> </font></b>
              <i><font color="#ff3434">result-column</font></i><b><font color="#2c2cf0"></font></b>]<b><font
                color="#2c2cf0"></font></b><big>*</big><b><font color="#2c2cf0"></font></b></td>
          </tr>
          <tr>
            <td align="right" valign="top">
              <i><font color="#ff3434">result-column</font></i> ::=</td>
            <td>
              <b><font color="#2c2cf0"><big>*</big> </font></b><big>|</big><b><font color="#2c2cf0">
              </font></b><i><font color="#ff3434">table-name</font></i><b><font color="#2c2cf0">
                <big>.</big> <big>*</big> </font></b><big>|</big><b><font color="#2c2cf0"> </font>
                </b><i><font color="#ff3434">expr</font></i><b><font color="#2c2cf0"> </font></b>
              [<b><font color="#2c2cf0"> </font></b>[<b><font color="#2c2cf0">AS</font></b>]<b><font
                color="#2c2cf0"> </font></b><i><font color="#ff3434">string</font></i><b><font color="#2c2cf0">
                </font></b>]<b><font color="#2c2cf0"></font></b></td>
          </tr>
          <tr>
            <td align="right" valign="top">
              <i><font color="#ff3434">table-list</font></i> ::=</td>
            <td>
              <b><font color="#2c2cf0"></font></b><i><font color="#ff3434">table</font></i><b><font
                color="#2c2cf0"> </font></b>[<b><font color="#2c2cf0"></font></b><i><font color="#ff3434">join-op</font></i><b><font
                  color="#2c2cf0"> </font></b><i><font color="#ff3434">table</font></i><b><font color="#2c2cf0">
                  </font></b><i><font color="#ff3434">join-args</font></i><b><font color="#2c2cf0"></font></b>]<b><font
                    color="#2c2cf0"></font></b><big>*</big><b><font color="#2c2cf0"></font></b></td>
          </tr>
          <tr>
            <td align="right" valign="top">
              <i><font color="#ff3434">table</font></i> ::=</td>
            <td>
              <b><font color="#2c2cf0"></font></b><i><font color="#ff3434">table-name</font></i><b><font
                color="#2c2cf0"> </font></b>[<b><font color="#2c2cf0">AS </font></b><i><font color="#ff3434">
                  alias</font></i><b><font color="#2c2cf0"></font></b>]<b><font color="#2c2cf0"> </font>
                  </b><big>|</big><b><font color="#2c2cf0"><br />
                    <big>(</big> </font></b><i><font color="#ff3434">select</font></i><b><font color="#2c2cf0">
                      <big>)</big> </font></b>[<b><font color="#2c2cf0">AS </font></b><i><font color="#ff3434">
                        alias</font></i><b><font color="#2c2cf0"></font></b>]<b><font color="#2c2cf0"></font></b></td>
          </tr>
          <tr>
            <td align="right" valign="top">
              <i><font color="#ff3434">join-op</font></i> ::=</td>
            <td>
              <b><font color="#2c2cf0"><big>,</big> </font></b><big>|</big><b><font color="#2c2cf0">
              </font></b>[<b><font color="#2c2cf0">NATURAL</font></b>]<b><font color="#2c2cf0">
              </font></b>[<b><font color="#2c2cf0">LEFT </font></b><big>|</big><b><font color="#2c2cf0">
                RIGHT </font></b><big>|</big><b><font color="#2c2cf0"> FULL</font></b>]<b><font color="#2c2cf0">
                </font></b>[<b><font color="#2c2cf0">OUTER </font></b><big>|</big><b><font color="#2c2cf0">
                  INNER </font></b><big>|</big><b><font color="#2c2cf0"> CROSS</font></b>]<b><font
                    color="#2c2cf0"> JOIN</font></b></td>
          </tr>
          <tr>
            <td align="right" valign="top">
              <i><font color="#ff3434">join-args</font></i> ::=</td>
            <td>
              <b><font color="#2c2cf0"></font></b>[<b><font color="#2c2cf0">ON </font></b><i><font
                color="#ff3434">expr</font></i><b><font color="#2c2cf0"></font></b>]<b><font color="#2c2cf0">
                </font></b>[<b><font color="#2c2cf0">USING <big>(</big> </font></b><i><font color="#ff3434">
                  id-list</font></i><b><font color="#2c2cf0"> <big>)</big></font></b>]<b><font color="#2c2cf0"></font></b></td>
          </tr>
          <tr>
            <td align="right" valign="top">
              <i><font color="#ff3434">sort-expr-list</font></i> ::=</td>
            <td>
              <b><font color="#2c2cf0"></font></b><i><font color="#ff3434">expr</font></i><b><font
                color="#2c2cf0"> </font></b>[<b><font color="#2c2cf0"></font></b><i><font color="#ff3434">sort-order</font></i><b><font
                  color="#2c2cf0"></font></b>]<b><font color="#2c2cf0"> </font></b>[<b><font color="#2c2cf0"><big>,</big>
                  </font></b><i><font color="#ff3434">expr</font></i><b><font color="#2c2cf0"> </font>
                  </b>[<b><font color="#2c2cf0"></font></b><i><font color="#ff3434">sort-order</font></i><b><font
                    color="#2c2cf0"></font></b>]<b><font color="#2c2cf0"></font></b>]<b><font color="#2c2cf0"></font></b><big>*</big><b><font
                      color="#2c2cf0"></font></b></td>
          </tr>
          <tr>
            <td align="right" valign="top">
              <i><font color="#ff3434">sort-order</font></i> ::=</td>
            <td>
              <b><font color="#2c2cf0"></font></b>[<b><font color="#2c2cf0"> COLLATE </font></b>
              <i><font color="#ff3434">collation-name</font></i><b><font color="#2c2cf0"> </font>
              </b>]<b><font color="#2c2cf0"> </font></b>[<b><font color="#2c2cf0"> ASC </font></b>
              <big>|</big><b><font color="#2c2cf0"> DESC </font></b>]<b><font color="#2c2cf0"></font></b></td>
          </tr>
          <tr>
            <td align="right" valign="top">
              <i><font color="#ff3434">compound_op</font></i> ::=</td>
            <td>
              <b><font color="#2c2cf0">UNION </font></b><big>|</big><b><font color="#2c2cf0"> UNION
                ALL </font></b><big>|</big><b><font color="#2c2cf0"> INTERSECT </font></b><big>|</big><b><font
                  color="#2c2cf0"> EXCEPT</font></b></td>
          </tr>
        </table>







|







 







|








|











|









|











|











|








|











|








|







56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
..
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
      <h1 class="heading">
        SQL As Understood By SQLite</h1>
      <h4>
        SELECT</h4>
      <p>
        <table cellpadding="10">
          <tr>
            <td align="right" width="1%" nowrap>
              <i><font color="#ff3434">sql-statement</font></i> ::=</td>
            <td>
              <b><font color="#2c2cf0">SELECT </font></b>[<b><font color="#2c2cf0">ALL </font></b>
              <big>|</big><b><font color="#2c2cf0"> DISTINCT</font></b>]<b><font color="#2c2cf0">
              </font></b><i><font color="#ff3434">result</font></i><b><font color="#2c2cf0"> </font>
              </b>[<b><font color="#2c2cf0">FROM </font></b><i><font color="#ff3434">table-list</font></i><b><font
                color="#2c2cf0"></font></b>]<b><font color="#2c2cf0"><br />
................................................................................
                            </font></b>[<b><font color="#2c2cf0">LIMIT </font></b><i><font color="#ff3434">integer</font></i><b><font
                              color="#2c2cf0"> </font></b>[<b><font color="#2c2cf0"></font></b>(<b><font color="#2c2cf0">
                                OFFSET </font></b><big>|</big><b><font color="#2c2cf0"> <big>,</big> </font></b>
              )<b><font color="#2c2cf0"> </font></b><i><font color="#ff3434">integer</font></i><b><font
                color="#2c2cf0"></font></b>]<b><font color="#2c2cf0"></font></b>]<b><font color="#2c2cf0"></font></b></td>
          </tr>
          <tr>
            <td align="right" width="1%" nowrap>
              <i><font color="#ff3434">result</font></i> ::=</td>
            <td>
              <b><font color="#2c2cf0"></font></b><i><font color="#ff3434">result-column</font></i><b><font
                color="#2c2cf0"> </font></b>[<b><font color="#2c2cf0"><big>,</big> </font></b>
              <i><font color="#ff3434">result-column</font></i><b><font color="#2c2cf0"></font></b>]<b><font
                color="#2c2cf0"></font></b><big>*</big><b><font color="#2c2cf0"></font></b></td>
          </tr>
          <tr>
            <td align="right" width="1%" nowrap>
              <i><font color="#ff3434">result-column</font></i> ::=</td>
            <td>
              <b><font color="#2c2cf0"><big>*</big> </font></b><big>|</big><b><font color="#2c2cf0">
              </font></b><i><font color="#ff3434">table-name</font></i><b><font color="#2c2cf0">
                <big>.</big> <big>*</big> </font></b><big>|</big><b><font color="#2c2cf0"> </font>
                </b><i><font color="#ff3434">expr</font></i><b><font color="#2c2cf0"> </font></b>
              [<b><font color="#2c2cf0"> </font></b>[<b><font color="#2c2cf0">AS</font></b>]<b><font
                color="#2c2cf0"> </font></b><i><font color="#ff3434">string</font></i><b><font color="#2c2cf0">
                </font></b>]<b><font color="#2c2cf0"></font></b></td>
          </tr>
          <tr>
            <td align="right" width="1%" nowrap>
              <i><font color="#ff3434">table-list</font></i> ::=</td>
            <td>
              <b><font color="#2c2cf0"></font></b><i><font color="#ff3434">table</font></i><b><font
                color="#2c2cf0"> </font></b>[<b><font color="#2c2cf0"></font></b><i><font color="#ff3434">join-op</font></i><b><font
                  color="#2c2cf0"> </font></b><i><font color="#ff3434">table</font></i><b><font color="#2c2cf0">
                  </font></b><i><font color="#ff3434">join-args</font></i><b><font color="#2c2cf0"></font></b>]<b><font
                    color="#2c2cf0"></font></b><big>*</big><b><font color="#2c2cf0"></font></b></td>
          </tr>
          <tr>
            <td align="right" width="1%" nowrap>
              <i><font color="#ff3434">table</font></i> ::=</td>
            <td>
              <b><font color="#2c2cf0"></font></b><i><font color="#ff3434">table-name</font></i><b><font
                color="#2c2cf0"> </font></b>[<b><font color="#2c2cf0">AS </font></b><i><font color="#ff3434">
                  alias</font></i><b><font color="#2c2cf0"></font></b>]<b><font color="#2c2cf0"> </font>
                  </b><big>|</big><b><font color="#2c2cf0"><br />
                    <big>(</big> </font></b><i><font color="#ff3434">select</font></i><b><font color="#2c2cf0">
                      <big>)</big> </font></b>[<b><font color="#2c2cf0">AS </font></b><i><font color="#ff3434">
                        alias</font></i><b><font color="#2c2cf0"></font></b>]<b><font color="#2c2cf0"></font></b></td>
          </tr>
          <tr>
            <td align="right" width="1%" nowrap>
              <i><font color="#ff3434">join-op</font></i> ::=</td>
            <td>
              <b><font color="#2c2cf0"><big>,</big> </font></b><big>|</big><b><font color="#2c2cf0">
              </font></b>[<b><font color="#2c2cf0">NATURAL</font></b>]<b><font color="#2c2cf0">
              </font></b>[<b><font color="#2c2cf0">LEFT </font></b><big>|</big><b><font color="#2c2cf0">
                RIGHT </font></b><big>|</big><b><font color="#2c2cf0"> FULL</font></b>]<b><font color="#2c2cf0">
                </font></b>[<b><font color="#2c2cf0">OUTER </font></b><big>|</big><b><font color="#2c2cf0">
                  INNER </font></b><big>|</big><b><font color="#2c2cf0"> CROSS</font></b>]<b><font
                    color="#2c2cf0"> JOIN</font></b></td>
          </tr>
          <tr>
            <td align="right" width="1%" nowrap>
              <i><font color="#ff3434">join-args</font></i> ::=</td>
            <td>
              <b><font color="#2c2cf0"></font></b>[<b><font color="#2c2cf0">ON </font></b><i><font
                color="#ff3434">expr</font></i><b><font color="#2c2cf0"></font></b>]<b><font color="#2c2cf0">
                </font></b>[<b><font color="#2c2cf0">USING <big>(</big> </font></b><i><font color="#ff3434">
                  id-list</font></i><b><font color="#2c2cf0"> <big>)</big></font></b>]<b><font color="#2c2cf0"></font></b></td>
          </tr>
          <tr>
            <td align="right" width="1%" nowrap>
              <i><font color="#ff3434">sort-expr-list</font></i> ::=</td>
            <td>
              <b><font color="#2c2cf0"></font></b><i><font color="#ff3434">expr</font></i><b><font
                color="#2c2cf0"> </font></b>[<b><font color="#2c2cf0"></font></b><i><font color="#ff3434">sort-order</font></i><b><font
                  color="#2c2cf0"></font></b>]<b><font color="#2c2cf0"> </font></b>[<b><font color="#2c2cf0"><big>,</big>
                  </font></b><i><font color="#ff3434">expr</font></i><b><font color="#2c2cf0"> </font>
                  </b>[<b><font color="#2c2cf0"></font></b><i><font color="#ff3434">sort-order</font></i><b><font
                    color="#2c2cf0"></font></b>]<b><font color="#2c2cf0"></font></b>]<b><font color="#2c2cf0"></font></b><big>*</big><b><font
                      color="#2c2cf0"></font></b></td>
          </tr>
          <tr>
            <td align="right" width="1%" nowrap>
              <i><font color="#ff3434">sort-order</font></i> ::=</td>
            <td>
              <b><font color="#2c2cf0"></font></b>[<b><font color="#2c2cf0"> COLLATE </font></b>
              <i><font color="#ff3434">collation-name</font></i><b><font color="#2c2cf0"> </font>
              </b>]<b><font color="#2c2cf0"> </font></b>[<b><font color="#2c2cf0"> ASC </font></b>
              <big>|</big><b><font color="#2c2cf0"> DESC </font></b>]<b><font color="#2c2cf0"></font></b></td>
          </tr>
          <tr>
            <td align="right" width="1%" nowrap>
              <i><font color="#ff3434">compound_op</font></i> ::=</td>
            <td>
              <b><font color="#2c2cf0">UNION </font></b><big>|</big><b><font color="#2c2cf0"> UNION
                ALL </font></b><big>|</big><b><font color="#2c2cf0"> INTERSECT </font></b><big>|</big><b><font
                  color="#2c2cf0"> EXCEPT</font></b></td>
          </tr>
        </table>

Changes to Doc/Extra/lang_transaction.html.

56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
      <h1 class="heading">
        SQL As Understood By SQLite</h1>
      <h4>
        BEGIN TRANSACTION</h4>
      <p>
        <table cellpadding="10">
          <tr>
            <td align="right" valign="top">
              <i><font color="#ff3434">sql-statement</font></i> ::=</td>
            <td>
              <b><font color="#2c2cf0">BEGIN </font></b>[<b><font color="#2c2cf0"> DEFERRED </font>
              </b><big>|</big><b><font color="#2c2cf0"> IMMEDIATE </font></b><big>|</big><b><font
                color="#2c2cf0"> EXCLUSIVE </font></b>]<b><font color="#2c2cf0"> </font></b>[<b><font
                  color="#2c2cf0">TRANSACTION </font></b>[<b><font color="#2c2cf0"></font></b><i><font
                    color="#ff3434">name</font></i><b><font color="#2c2cf0"></font></b>]<b><font color="#2c2cf0"></font></b>]<b><font
                      color="#2c2cf0"></font></b></td>
          </tr>
        </table>
        <table cellpadding="10">
          <tr>
            <td align="right" valign="top">
              <i><font color="#ff3434">sql-statement</font></i> ::=</td>
            <td>
              <b><font color="#2c2cf0">END </font></b>[<b><font color="#2c2cf0">TRANSACTION </font>
              </b>[<b><font color="#2c2cf0"></font></b><i><font color="#ff3434">name</font></i><b><font
                color="#2c2cf0"></font></b>]<b><font color="#2c2cf0"></font></b>]<b><font color="#2c2cf0"></font></b></td>
          </tr>
        </table>
        <table cellpadding="10">
          <tr>
            <td align="right" valign="top">
              <i><font color="#ff3434">sql-statement</font></i> ::=</td>
            <td>
              <b><font color="#2c2cf0">COMMIT </font></b>[<b><font color="#2c2cf0">TRANSACTION </font>
              </b>[<b><font color="#2c2cf0"></font></b><i><font color="#ff3434">name</font></i><b><font
                color="#2c2cf0"></font></b>]<b><font color="#2c2cf0"></font></b>]<b><font color="#2c2cf0"></font></b></td>
          </tr>
        </table>
        <table cellpadding="10">
          <tr>
            <td align="right" valign="top">
              <i><font color="#ff3434">sql-statement</font></i> ::=</td>
            <td>
              <b><font color="#2c2cf0">ROLLBACK </font></b>[<b><font color="#2c2cf0">TRANSACTION
              </font></b>[<b><font color="#2c2cf0"></font></b><i><font color="#ff3434">name</font></i><b><font
                color="#2c2cf0"></font></b>]<b><font color="#2c2cf0"></font></b>]<b><font color="#2c2cf0"></font></b></td>
          </tr>
        </table>







|












|









|









|







56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
      <h1 class="heading">
        SQL As Understood By SQLite</h1>
      <h4>
        BEGIN TRANSACTION</h4>
      <p>
        <table cellpadding="10">
          <tr>
            <td align="right" width="1%" nowrap>
              <i><font color="#ff3434">sql-statement</font></i> ::=</td>
            <td>
              <b><font color="#2c2cf0">BEGIN </font></b>[<b><font color="#2c2cf0"> DEFERRED </font>
              </b><big>|</big><b><font color="#2c2cf0"> IMMEDIATE </font></b><big>|</big><b><font
                color="#2c2cf0"> EXCLUSIVE </font></b>]<b><font color="#2c2cf0"> </font></b>[<b><font
                  color="#2c2cf0">TRANSACTION </font></b>[<b><font color="#2c2cf0"></font></b><i><font
                    color="#ff3434">name</font></i><b><font color="#2c2cf0"></font></b>]<b><font color="#2c2cf0"></font></b>]<b><font
                      color="#2c2cf0"></font></b></td>
          </tr>
        </table>
        <table cellpadding="10">
          <tr>
            <td align="right" width="1%" nowrap>
              <i><font color="#ff3434">sql-statement</font></i> ::=</td>
            <td>
              <b><font color="#2c2cf0">END </font></b>[<b><font color="#2c2cf0">TRANSACTION </font>
              </b>[<b><font color="#2c2cf0"></font></b><i><font color="#ff3434">name</font></i><b><font
                color="#2c2cf0"></font></b>]<b><font color="#2c2cf0"></font></b>]<b><font color="#2c2cf0"></font></b></td>
          </tr>
        </table>
        <table cellpadding="10">
          <tr>
            <td align="right" width="1%" nowrap>
              <i><font color="#ff3434">sql-statement</font></i> ::=</td>
            <td>
              <b><font color="#2c2cf0">COMMIT </font></b>[<b><font color="#2c2cf0">TRANSACTION </font>
              </b>[<b><font color="#2c2cf0"></font></b><i><font color="#ff3434">name</font></i><b><font
                color="#2c2cf0"></font></b>]<b><font color="#2c2cf0"></font></b>]<b><font color="#2c2cf0"></font></b></td>
          </tr>
        </table>
        <table cellpadding="10">
          <tr>
            <td align="right" width="1%" nowrap>
              <i><font color="#ff3434">sql-statement</font></i> ::=</td>
            <td>
              <b><font color="#2c2cf0">ROLLBACK </font></b>[<b><font color="#2c2cf0">TRANSACTION
              </font></b>[<b><font color="#2c2cf0"></font></b><i><font color="#ff3434">name</font></i><b><font
                color="#2c2cf0"></font></b>]<b><font color="#2c2cf0"></font></b>]<b><font color="#2c2cf0"></font></b></td>
          </tr>
        </table>

Changes to Doc/Extra/lang_update.html.

56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
..
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
      <h1 class="heading">
        SQL As Understood By SQLite</h1>
      <h4>
        UPDATE</h4>
      <p>
        <table cellpadding="10">
          <tr>
            <td align="right" valign="top">
              <i><font color="#ff3434">sql-statement</font></i> ::=</td>
            <td>
              <b><font color="#2c2cf0">UPDATE </font></b>[<b><font color="#2c2cf0"> OR </font></b>
              <i><font color="#ff3434">conflict-algorithm</font></i><b><font color="#2c2cf0"> </font>
              </b>]<b><font color="#2c2cf0"> </font></b>[<b><font color="#2c2cf0"></font></b><i><font
                color="#ff3434">database-name</font></i><b><font color="#2c2cf0"> <big>.</big></font></b>]<b><font
                  color="#2c2cf0"> </font></b><i><font color="#ff3434">table-name</font></i><b><font
................................................................................
                    </font></b>[<b><font color="#2c2cf0"><big>,</big> </font></b><i><font color="#ff3434">
                      assignment</font></i><b><font color="#2c2cf0"></font></b>]<b><font color="#2c2cf0"></font></b><big>*</big><b><font
                        color="#2c2cf0"><br />
                      </font></b>[<b><font color="#2c2cf0">WHERE </font></b><i><font color="#ff3434">expr</font></i><b><font
                        color="#2c2cf0"></font></b>]<b><font color="#2c2cf0"></font></b></td>
          </tr>
          <tr>
            <td align="right" valign="top">
              <i><font color="#ff3434">assignment</font></i> ::=</td>
            <td>
              <b><font color="#2c2cf0"></font></b><i><font color="#ff3434">column-name</font></i><b><font
                color="#2c2cf0"> <big>=</big> </font></b><i><font color="#ff3434">expr</font></i><b><font
                  color="#2c2cf0"></font></b></td>
          </tr>
        </table>







|







 







|







56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
..
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
      <h1 class="heading">
        SQL As Understood By SQLite</h1>
      <h4>
        UPDATE</h4>
      <p>
        <table cellpadding="10">
          <tr>
            <td align="right" width="1%" nowrap>
              <i><font color="#ff3434">sql-statement</font></i> ::=</td>
            <td>
              <b><font color="#2c2cf0">UPDATE </font></b>[<b><font color="#2c2cf0"> OR </font></b>
              <i><font color="#ff3434">conflict-algorithm</font></i><b><font color="#2c2cf0"> </font>
              </b>]<b><font color="#2c2cf0"> </font></b>[<b><font color="#2c2cf0"></font></b><i><font
                color="#ff3434">database-name</font></i><b><font color="#2c2cf0"> <big>.</big></font></b>]<b><font
                  color="#2c2cf0"> </font></b><i><font color="#ff3434">table-name</font></i><b><font
................................................................................
                    </font></b>[<b><font color="#2c2cf0"><big>,</big> </font></b><i><font color="#ff3434">
                      assignment</font></i><b><font color="#2c2cf0"></font></b>]<b><font color="#2c2cf0"></font></b><big>*</big><b><font
                        color="#2c2cf0"><br />
                      </font></b>[<b><font color="#2c2cf0">WHERE </font></b><i><font color="#ff3434">expr</font></i><b><font
                        color="#2c2cf0"></font></b>]<b><font color="#2c2cf0"></font></b></td>
          </tr>
          <tr>
            <td align="right" width="1%" nowrap>
              <i><font color="#ff3434">assignment</font></i> ::=</td>
            <td>
              <b><font color="#2c2cf0"></font></b><i><font color="#ff3434">column-name</font></i><b><font
                color="#2c2cf0"> <big>=</big> </font></b><i><font color="#ff3434">expr</font></i><b><font
                  color="#2c2cf0"></font></b></td>
          </tr>
        </table>

Changes to Doc/Extra/lang_vacuum.html.

56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
      <h1 class="heading">
        SQL As Understood By SQLite</h1>
      <h4>
        VACUUM</h4>
      <p>
        <table cellpadding="10">
          <tr>
            <td align="right" valign="top">
              <i><font color="#ff3434">sql-statement</font></i> ::=</td>
            <td>
              <b><font color="#2c2cf0">VACUUM </font></b>[<b><font color="#2c2cf0"></font></b><i><font
                color="#ff3434">index-or-table-name</font></i><b><font color="#2c2cf0"></font></b>]<b><font
                  color="#2c2cf0"></font></b></td>
          </tr>
        </table>







|







56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
      <h1 class="heading">
        SQL As Understood By SQLite</h1>
      <h4>
        VACUUM</h4>
      <p>
        <table cellpadding="10">
          <tr>
            <td align="right" width="1%" nowrap>
              <i><font color="#ff3434">sql-statement</font></i> ::=</td>
            <td>
              <b><font color="#2c2cf0">VACUUM </font></b>[<b><font color="#2c2cf0"></font></b><i><font
                color="#ff3434">index-or-table-name</font></i><b><font color="#2c2cf0"></font></b>]<b><font
                  color="#2c2cf0"></font></b></td>
          </tr>
        </table>

Changes to Doc/Extra/limitations.html.

59
60
61
62
63
64
65

66
67
68
69
70
71
72
73
        support for row-level or table-level locks. When a connection locks the database for writing, no other connection or process may read or write to the database until the write operation is complete.  The SQLite.NET provider attempts to retry 
        internally if a database is locked, up to the CommandTimeout property of the 
        command in question.</p>
      <p>SQLite is inherently type-less, and only understands a few basic datatypes 
        natively. They are (in .NET-speak) Int64, Double, String and Blob. The 
        SQLite.NET provider will use the database schema information it can glean to 
        enforce type-ness, but it is an inexact science.</p>

      <p>Nested transactions and hierarchical DataReaders are not supported. In the 
        case of transactions, any SQLiteCommand created on a connection will (when 
        executed) automatically join a transaction in progress, regardless of whether 
        that transaction was created before or after the command.</p>
      <p>A SQLiteCommand object <b>can</b> be re-assigned a new SQLiteConnection object 
        as long as no DataReaders are active on the command.</p>
      <p>Opening a transaction is considered a write operation, so only use them when 
        you want to write to the database! If you hold open a transaction, all readers 







>
|







59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
        support for row-level or table-level locks. When a connection locks the database for writing, no other connection or process may read or write to the database until the write operation is complete.  The SQLite.NET provider attempts to retry 
        internally if a database is locked, up to the CommandTimeout property of the 
        command in question.</p>
      <p>SQLite is inherently type-less, and only understands a few basic datatypes 
        natively. They are (in .NET-speak) Int64, Double, String and Blob. The 
        SQLite.NET provider will use the database schema information it can glean to 
        enforce type-ness, but it is an inexact science.</p>
      <p>
        Hierarchical DataReaders are not supported. In the 
        case of transactions, any SQLiteCommand created on a connection will (when 
        executed) automatically join a transaction in progress, regardless of whether 
        that transaction was created before or after the command.</p>
      <p>A SQLiteCommand object <b>can</b> be re-assigned a new SQLiteConnection object 
        as long as no DataReaders are active on the command.</p>
      <p>Opening a transaction is considered a write operation, so only use them when 
        you want to write to the database! If you hold open a transaction, all readers 

Changes to Doc/Extra/pragma.html.

90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
      <hr />
      <a name="syntax"></a>
      <h1>
        PRAGMA command syntax</h1>
      <p>
        <table cellpadding="10">
          <tr>
            <td align="right" valign="top">
              <i><font color="#ff3434">sql-statement</font></i> ::=</td>
            <td>
              <b><font color="#2c2cf0">PRAGMA </font></b><i><font color="#ff3434">name</font></i><b><font
                color="#2c2cf0"> </font></b>[<b><font color="#2c2cf0">= </font></b><i><font color="#ff3434">
                  value</font></i><b><font color="#2c2cf0"></font></b>]<b><font color="#2c2cf0"> </font>
                  </b><big>|</big><b><font color="#2c2cf0"><br />
                    PRAGMA </font></b><i><font color="#ff3434">function</font></i><b><font color="#2c2cf0"><big>(</big></font></b><i><font







|







90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
      <hr />
      <a name="syntax"></a>
      <h1>
        PRAGMA command syntax</h1>
      <p>
        <table cellpadding="10">
          <tr>
            <td align="right" width="1%" nowrap>
              <i><font color="#ff3434">sql-statement</font></i> ::=</td>
            <td>
              <b><font color="#2c2cf0">PRAGMA </font></b><i><font color="#ff3434">name</font></i><b><font
                color="#2c2cf0"> </font></b>[<b><font color="#2c2cf0">= </font></b><i><font color="#ff3434">
                  value</font></i><b><font color="#2c2cf0"></font></b>]<b><font color="#2c2cf0"> </font>
                  </b><big>|</big><b><font color="#2c2cf0"><br />
                    PRAGMA </font></b><i><font color="#ff3434">function</font></i><b><font color="#2c2cf0"><big>(</big></font></b><i><font

Changes to Doc/Extra/version.html.

52
53
54
55
56
57
58


















59
60
61
62
63
64
65
        </tr>
      </table>
    </div>
    <div id="mainSection">
    <div id="mainBody">

      <h1 class="heading">Version History</h1>


















    <p><b>1.0.34.0 - September 4, 2006</b></p>
    <ul>
    <li>Fixed a bug in SQLiteParameterCollection.RemoveAt(namedparam)</li>
    <li>Fixed a bug in SQLiteDataReader introduced in 1.0.30 that broke DateTimes using the Ticks option in the connection string.</li>
      <li>Fixed a bug in the recent changes to guid behavior wherein using a datareader's
        indexer to fetch a guid from a column containing both binary and text guids would
        sometimes return a byte array instead of a guid.</li>







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
        </tr>
      </table>
    </div>
    <div id="mainSection">
    <div id="mainBody">

      <h1 class="heading">Version History</h1>
    <p><b>1.0.35.1 - September 12, 2006</b></p>
    <ul>
    <li>Fixed the TYPES keyword to work when UseUTF16Encoding is true.</li>
    <li>Fix another bug revealed in 1.0.35.0 regarding infinite loops when the 2nd or subsequent statements of a semi-colon separated command cannot be parsed.</li>
      <li>Updated the help documentation.&nbsp;</li>
    </ul>
    <p><b>1.0.35.0 - September 10, 2006</b></p>
    <ul>
    <li>Fixed an infinite loop bug in SQLiteCommand caused when multiple semi-colon separated
      statements in a single command are executed via datareader and one of the statements
      contains a syntax error preventing it from being prepared.&nbsp;</li><li>Added the TYPES preparser keyword to be placed before a SELECT statement to
    aid the wrapper in converting expressions in a subsequent select clause into more
    robust types.&nbsp; Documentation yet to be integrated, but available on the forums.</li>
      <li>Added a new connectionstring parameter "BinaryGUID=true/false" (default is "true").&nbsp;
        When true, guid types are stored in the database as binary blobs to save space.&nbsp;
        Binary has been the default format since 1.0.32.0 but this parameter eases backward
        compatibility.</li>
    </ul>
    <p><b>1.0.34.0 - September 4, 2006</b></p>
    <ul>
    <li>Fixed a bug in SQLiteParameterCollection.RemoveAt(namedparam)</li>
    <li>Fixed a bug in SQLiteDataReader introduced in 1.0.30 that broke DateTimes using the Ticks option in the connection string.</li>
      <li>Fixed a bug in the recent changes to guid behavior wherein using a datareader's
        indexer to fetch a guid from a column containing both binary and text guids would
        sometimes return a byte array instead of a guid.</li>

Changes to Doc/SQLite.NET.chm.

cannot compute difference between binary files

Changes to Doc/SQLite.NET.ndoc.

1
2
3
4
5
6












7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<project SchemaVersion="2.0">
    <assemblies>
        <assembly location="..\bin\System.Data.SQLite.DLL" documentation="..\bin\System.Data.SQLite.xml" />
    </assemblies>
    <documenters>












        <documenter name="MSDN-CHM">
            <property name="IncludeFavorites" value="True" />
            <property name="SdkLinksOnWeb" value="True" />
            <property name="OutputDirectory" value=".\doc\" />
            <property name="HtmlHelpName" value="SQLite.NET" />
            <property name="Title" value="SQLite ADO.NET 2.0 Provider" />
            <property name="AdditionalContentResourceDirectory" value=".\Extra\" />
            <property name="AssemblyVersionInfo" value="AssemblyVersion" />
            <property name="FeedbackEmailAddress" value="robert@blackcastlesoft.com" />
            <property name="DocumentAttributes" value="False" />
            <property name="IncludeDefaultThreadSafety" value="False" />
        </documenter>
        <documenter name="XML">
            <property name="OutputFile" value=".\doc\doc.xml" />
        </documenter>
        <documenter name="Intellisense">
            <property name="OutputDirectory" value=".\intellisense\" />
        </documenter>
    </documenters>
</project>






>
>
>
>
>
>
>
>
>
>
>
>



|








<
<
<
<
<
<


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30






31
32
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<project SchemaVersion="2.0">
    <assemblies>
        <assembly location="..\bin\System.Data.SQLite.DLL" documentation="..\bin\System.Data.SQLite.xml" />
    </assemblies>
    <documenters>
        <documenter name="MSDN-Help2">
            <property name="PlugInNamespace" value="ms.vscc" />
            <property name="OutputDirectory" value=".\doc\" />
            <property name="HtmlHelpName" value="Documentation" />
            <property name="Title" value="An NDoc documented library" />
        </documenter>
        <documenter name="XML">
            <property name="OutputFile" value=".\doc\doc.xml" />
        </documenter>
        <documenter name="Intellisense">
            <property name="OutputDirectory" value=".\intellisense\" />
        </documenter>
        <documenter name="MSDN-CHM">
            <property name="IncludeFavorites" value="True" />
            <property name="SdkLinksOnWeb" value="True" />
            <property name="OutputDirectory" value=".\" />
            <property name="HtmlHelpName" value="SQLite.NET" />
            <property name="Title" value="SQLite ADO.NET 2.0 Provider" />
            <property name="AdditionalContentResourceDirectory" value=".\Extra\" />
            <property name="AssemblyVersionInfo" value="AssemblyVersion" />
            <property name="FeedbackEmailAddress" value="robert@blackcastlesoft.com" />
            <property name="DocumentAttributes" value="False" />
            <property name="IncludeDefaultThreadSafety" value="False" />
        </documenter>






    </documenters>
</project>

Changes to System.Data.SQLite/SQLiteCommand.cs.

209
210
211
212
213
214
215



216
217
218
219
220
221
222
        if (stmt != null)
        {
          if (_statementList.Contains(stmt))
            _statementList.Remove(stmt);

          stmt.Dispose();
        }




        throw;
      }
    }

    internal SQLiteStatement GetStatement(int index)
    {







>
>
>







209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
        if (stmt != null)
        {
          if (_statementList.Contains(stmt))
            _statementList.Remove(stmt);

          stmt.Dispose();
        }

        // If we threw an error compiling the statement, we cannot continue on so set the remaining text to null.
        _remainingText = null;

        throw;
      }
    }

    internal SQLiteStatement GetStatement(int index)
    {

Changes to readme.htm.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
...
116
117
118
119
120
121
122






123
124
125
126
127
128
129
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <title></title>
  </head>
  <body>
    ADO.NET 2.0 SQLite Data Provider<br>
    Version 1.0.35.0 September 10, 2006<br>
    Using SQLite 3.3.7<br>
    Written by Robert Simpson (<a href="mailto:robert@blackcastlesoft.com">robert@blackcastlesoft.com</a>)<br>
    Released to the public domain, use at your own risk!<br>
    Official provider website:&nbsp; <a href="http://sqlite.phxsoftware.com">http://sqlite.phxsoftware.com</a><br />
    <br>
    The latest version can be downloaded <a href="http://sourceforge.net/projects/sqlite-dotnet2">
      here</a>
................................................................................
      The SQLite3 source code is compiled directly from the SQLite.org release
      sources.&nbsp; All builds of sqlite after 3.2.8 have included support for Windows CE.&nbsp; Additionally,
      just one minor modification is made to pager.c, that modification is made automatically by the fixsource.vbs file
      when the VS2005 solution is compiled.</p>
    <p></p>
    <p>
      <b>Version History</b></p>






    <p><b>1.0.35.0 - September 10, 2006</b></p>
    <ul>
    <li>Fixed an infinite loop bug in SQLiteCommand caused when multiple semi-colon separated
      statements in a single command are executed via datareader and one of the statements
      contains a syntax error preventing it from being prepared.&nbsp;</li><li>Added the TYPES preparser keyword to be placed before a SELECT statement to
    aid the wrapper in converting expressions in a subsequent select clause into more
    robust types.&nbsp; Documentation yet to be integrated, but available on the forums.</li>







|







 







>
>
>
>
>
>







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
...
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <title></title>
  </head>
  <body>
    ADO.NET 2.0 SQLite Data Provider<br>
    Version 1.0.35.1 September 12, 2006<br>
    Using SQLite 3.3.7<br>
    Written by Robert Simpson (<a href="mailto:robert@blackcastlesoft.com">robert@blackcastlesoft.com</a>)<br>
    Released to the public domain, use at your own risk!<br>
    Official provider website:&nbsp; <a href="http://sqlite.phxsoftware.com">http://sqlite.phxsoftware.com</a><br />
    <br>
    The latest version can be downloaded <a href="http://sourceforge.net/projects/sqlite-dotnet2">
      here</a>
................................................................................
      The SQLite3 source code is compiled directly from the SQLite.org release
      sources.&nbsp; All builds of sqlite after 3.2.8 have included support for Windows CE.&nbsp; Additionally,
      just one minor modification is made to pager.c, that modification is made automatically by the fixsource.vbs file
      when the VS2005 solution is compiled.</p>
    <p></p>
    <p>
      <b>Version History</b></p>
    <p><b>1.0.35.1 - September 12, 2006</b></p>
    <ul>
    <li>Fixed the TYPES keyword to work when UseUTF16Encoding is true.</li>
    <li>Fix another bug revealed in 1.0.35.0 regarding infinite loops when the 2nd or subsequent statements of a semi-colon separated command cannot be parsed.</li>
      <li>Updated the help documentation.&nbsp;</li>
    </ul>
    <p><b>1.0.35.0 - September 10, 2006</b></p>
    <ul>
    <li>Fixed an infinite loop bug in SQLiteCommand caused when multiple semi-colon separated
      statements in a single command are executed via datareader and one of the statements
      contains a syntax error preventing it from being prepared.&nbsp;</li><li>Added the TYPES preparser keyword to be placed before a SELECT statement to
    aid the wrapper in converting expressions in a subsequent select clause into more
    robust types.&nbsp; Documentation yet to be integrated, but available on the forums.</li>