System.Data.SQLite

Check-in [6bb5d25e27]
Login

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

Overview
Comment:Pickup the SQLite core library 3.23.0 docs from upstream.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 6bb5d25e273ca5456f5512592a6a90462fe1dee9
User & Date: mistachkin 2018-04-05 03:45:27.697
Context
2018-04-09
15:51
Revise batch build tool for Mono to include support for Visual Studio 2015. check-in: 6a7c6452dc user: mistachkin tags: trunk
2018-04-05
04:51
Initial work on porting the primary managed assembly to .NET Standard 2.0 (using .NET Core 2.0). check-in: b936950261 user: mistachkin tags: netStandard20
03:45
Pickup the SQLite core library 3.23.0 docs from upstream. check-in: 6bb5d25e27 user: mistachkin tags: trunk
03:42
Update SQLite core library to the 3.23.0 release. check-in: 5540efea0c user: mistachkin tags: trunk
Changes
Unified Diff Ignore Whitespace Patch
Changes to Doc/Extra/Core/images/syntax/literal-value.gif.

cannot compute difference between binary files

Changes to Doc/Extra/Core/lang.html.
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124

<p>The following syntax documentation topics are available:</p>

<table width="100%" cellpadding="5" border="0">
<tr><td valign="top"><ul>

<style>
#listtab27 tr td {vertical-align:top;}
</style>
<table id='listtab27' width='100%'></table>
<script>
var listitems27 = [{"u":"lang_aggfunc.html","x":"aggregate functions","s":0},
{"u":"lang_altertable.html","x":"ALTER TABLE","s":0},
{"u":"lang_analyze.html","x":"ANALYZE","s":0},
{"u":"lang_attach.html","x":"ATTACH DATABASE","s":0},
{"u":"lang_transaction.html","x":"BEGIN TRANSACTION","s":0},
{"u":"lang_comment.html","x":"comment","s":0},
{"u":"lang_transaction.html","x":"COMMIT TRANSACTION","s":0},
{"u":"lang_corefunc.html","x":"core functions","s":0},







|

|

|







106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124

<p>The following syntax documentation topics are available:</p>

<table width="100%" cellpadding="5" border="0">
<tr><td valign="top"><ul>

<style>
#listtab29 tr td {vertical-align:top;}
</style>
<table id='listtab29' width='100%'></table>
<script>
var listitems29 = [{"u":"lang_aggfunc.html","x":"aggregate functions","s":0},
{"u":"lang_altertable.html","x":"ALTER TABLE","s":0},
{"u":"lang_analyze.html","x":"ANALYZE","s":0},
{"u":"lang_attach.html","x":"ATTACH DATABASE","s":0},
{"u":"lang_transaction.html","x":"BEGIN TRANSACTION","s":0},
{"u":"lang_comment.html","x":"comment","s":0},
{"u":"lang_transaction.html","x":"COMMIT TRANSACTION","s":0},
{"u":"lang_corefunc.html","x":"core functions","s":0},
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
{"u":"lang_update.html","x":"UPDATE","s":0},
{"u":"lang_vacuum.html","x":"VACUUM","s":0},
{"u":"lang_with.html","x":"WITH clause","s":0}];
var j = 0;
var w = Math.max(document.documentElement.clientWidth,  window.innerWidth || 0);
var nCol = Math.floor(w/340);
if(nCol<=0) nCol=1;
var nRow = Math.ceil((listitems27.length+1)/nCol);
var h="<tr><td><ul class='multicol_list'>"
var ea
for(var i=0; i<listitems27.length; i++){
  if( (++j)>nRow ){
    h += "</ul></td>\n<td><ul class='multicol_list'>\n";
    j = 1;
  }
  if(listitems27[i].u=="" || listitems27[i].s==2){
    h += "<li>"
    ea = ""
  }else{
    h += "<li><a href='";
    h += listitems27[i].u;
    h += "'>";
    ea = "</a>"
  }
  if(listitems27[i].s==2 || listitems27[i].s==3) h += "<s>"
  h += listitems27[i].x;
  if(listitems27[i].s==2 || listitems27[i].s==3) h += "</s>"
  h += ea
  if(listitems27[i].s==1) h += "<small><i>(exp)</i></small>\n";
  if(listitems27[i].s==3) h += "&sup1\n";
  if(listitems27[i].s==4) h += "&sup2\n";
  if(listitems27[i].s==5) h += "&sup3\n";
}
document.getElementById("listtab27").innerHTML = h;
</script>

</ul></td></tr></table>

<p>The routines <a href="c3ref/prepare.html">sqlite3_prepare_v2()</a>, <a href="c3ref/prepare.html">sqlite3_prepare()</a>,
<a href="c3ref/prepare.html">sqlite3_prepare16()</a>, <a href="c3ref/prepare.html">sqlite3_prepare16_v2()</a>, 
<a href="c3ref/exec.html">sqlite3_exec()</a>, and <a href="c3ref/free_table.html">sqlite3_get_table()</a> accept







|


|




|




|



|
|
|

|
|
|
|

|







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
{"u":"lang_update.html","x":"UPDATE","s":0},
{"u":"lang_vacuum.html","x":"VACUUM","s":0},
{"u":"lang_with.html","x":"WITH clause","s":0}];
var j = 0;
var w = Math.max(document.documentElement.clientWidth,  window.innerWidth || 0);
var nCol = Math.floor(w/340);
if(nCol<=0) nCol=1;
var nRow = Math.ceil((listitems29.length+1)/nCol);
var h="<tr><td><ul class='multicol_list'>"
var ea
for(var i=0; i<listitems29.length; i++){
  if( (++j)>nRow ){
    h += "</ul></td>\n<td><ul class='multicol_list'>\n";
    j = 1;
  }
  if(listitems29[i].u=="" || listitems29[i].s==2){
    h += "<li>"
    ea = ""
  }else{
    h += "<li><a href='";
    h += listitems29[i].u;
    h += "'>";
    ea = "</a>"
  }
  if(listitems29[i].s==2 || listitems29[i].s==3) h += "<s>"
  h += listitems29[i].x;
  if(listitems29[i].s==2 || listitems29[i].s==3) h += "</s>"
  h += ea
  if(listitems29[i].s==1) h += "<small><i>(exp)</i></small>\n";
  if(listitems29[i].s==3) h += "&sup1\n";
  if(listitems29[i].s==4) h += "&sup2\n";
  if(listitems29[i].s==5) h += "&sup3\n";
}
document.getElementById("listtab29").innerHTML = h;
</script>

</ul></td></tr></table>

<p>The routines <a href="c3ref/prepare.html">sqlite3_prepare_v2()</a>, <a href="c3ref/prepare.html">sqlite3_prepare()</a>,
<a href="c3ref/prepare.html">sqlite3_prepare16()</a>, <a href="c3ref/prepare.html">sqlite3_prepare16_v2()</a>, 
<a href="c3ref/exec.html">sqlite3_exec()</a>, and <a href="c3ref/free_table.html">sqlite3_get_table()</a> accept
Changes to Doc/Extra/Core/lang_aggfunc.html.
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
elements are filtered before being passed into the aggregate function.
For example, the function "count(distinct X)" will return the number
of distinct values of column X instead of the total number of non-null
values in column X.
</p>

<style>
#listtab29 tr td {vertical-align:top;}
</style>
<table id='listtab29' width='100%'></table>
<script>
var listitems29 = [{"u":"lang_aggfunc.html#avg","x":"avg(X)","s":0},
{"u":"lang_aggfunc.html#count","x":"count(*)","s":0},
{"u":"lang_aggfunc.html#count","x":"count(X)","s":0},
{"u":"lang_aggfunc.html#groupconcat","x":"group_concat(X)","s":0},
{"u":"lang_aggfunc.html#groupconcat","x":"group_concat(X,Y)","s":0},
{"u":"lang_corefunc.html#maxoreunc","x":"max(X)","s":0},
{"u":"lang_corefunc.html#minoreunc","x":"min(X)","s":0},
{"u":"lang_aggfunc.html#sumunc","x":"sum(X)","s":0},
{"u":"lang_aggfunc.html#sumunc","x":"total(X)","s":0}];
var j = 0;
var w = Math.max(document.documentElement.clientWidth,  window.innerWidth || 0);
var nCol = Math.floor(w/225);
if(nCol<=0) nCol=1;
var nRow = Math.ceil((listitems29.length+1)/nCol);
var h="<tr><td><ul class='multicol_list'>"
var ea
for(var i=0; i<listitems29.length; i++){
  if( (++j)>nRow ){
    h += "</ul></td>\n<td><ul class='multicol_list'>\n";
    j = 1;
  }
  if(listitems29[i].u=="" || listitems29[i].s==2){
    h += "<li>"
    ea = ""
  }else{
    h += "<li><a href='";
    h += listitems29[i].u;
    h += "'>";
    ea = "</a>"
  }
  if(listitems29[i].s==2 || listitems29[i].s==3) h += "<s>"
  h += listitems29[i].x;
  if(listitems29[i].s==2 || listitems29[i].s==3) h += "</s>"
  h += ea
  if(listitems29[i].s==1) h += "<small><i>(exp)</i></small>\n";
  if(listitems29[i].s==3) h += "&sup1\n";
  if(listitems29[i].s==4) h += "&sup2\n";
  if(listitems29[i].s==5) h += "&sup3\n";
}
document.getElementById("listtab29").innerHTML = h;
</script>
<hr class='xhr'>
<dl>
<a name="avg"></a>
<dt><p><b>avg(<i>X</i>)</b></dt><dd><p>
  The avg() function
  returns the average value of all non-NULL <i>X</i> within a







|

|

|












|


|




|




|



|
|
|

|
|
|
|

|







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
elements are filtered before being passed into the aggregate function.
For example, the function "count(distinct X)" will return the number
of distinct values of column X instead of the total number of non-null
values in column X.
</p>

<style>
#listtab31 tr td {vertical-align:top;}
</style>
<table id='listtab31' width='100%'></table>
<script>
var listitems31 = [{"u":"lang_aggfunc.html#avg","x":"avg(X)","s":0},
{"u":"lang_aggfunc.html#count","x":"count(*)","s":0},
{"u":"lang_aggfunc.html#count","x":"count(X)","s":0},
{"u":"lang_aggfunc.html#groupconcat","x":"group_concat(X)","s":0},
{"u":"lang_aggfunc.html#groupconcat","x":"group_concat(X,Y)","s":0},
{"u":"lang_corefunc.html#maxoreunc","x":"max(X)","s":0},
{"u":"lang_corefunc.html#minoreunc","x":"min(X)","s":0},
{"u":"lang_aggfunc.html#sumunc","x":"sum(X)","s":0},
{"u":"lang_aggfunc.html#sumunc","x":"total(X)","s":0}];
var j = 0;
var w = Math.max(document.documentElement.clientWidth,  window.innerWidth || 0);
var nCol = Math.floor(w/225);
if(nCol<=0) nCol=1;
var nRow = Math.ceil((listitems31.length+1)/nCol);
var h="<tr><td><ul class='multicol_list'>"
var ea
for(var i=0; i<listitems31.length; i++){
  if( (++j)>nRow ){
    h += "</ul></td>\n<td><ul class='multicol_list'>\n";
    j = 1;
  }
  if(listitems31[i].u=="" || listitems31[i].s==2){
    h += "<li>"
    ea = ""
  }else{
    h += "<li><a href='";
    h += listitems31[i].u;
    h += "'>";
    ea = "</a>"
  }
  if(listitems31[i].s==2 || listitems31[i].s==3) h += "<s>"
  h += listitems31[i].x;
  if(listitems31[i].s==2 || listitems31[i].s==3) h += "</s>"
  h += ea
  if(listitems31[i].s==1) h += "<small><i>(exp)</i></small>\n";
  if(listitems31[i].s==3) h += "&sup1\n";
  if(listitems31[i].s==4) h += "&sup2\n";
  if(listitems31[i].s==5) h += "&sup3\n";
}
document.getElementById("listtab31").innerHTML = h;
</script>
<hr class='xhr'>
<dl>
<a name="avg"></a>
<dt><p><b>avg(<i>X</i>)</b></dt><dd><p>
  The avg() function
  returns the average value of all non-NULL <i>X</i> within a
Changes to Doc/Extra/Core/lang_corefunc.html.
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
<a href="lang_aggfunc.html">aggregate functions</a>, and
<a href="json1.html">JSON functions</a> are documented separately.  An
application may define additional
functions written in C and added to the database engine using
the <a href="c3ref/create_function.html">sqlite3_create_function()</a> API.</p>

<style>
#listtab28 tr td {vertical-align:top;}
</style>
<table id='listtab28' width='100%'></table>
<script>
var listitems28 = [{"u":"lang_corefunc.html#abs","x":"abs(X)","s":0},
{"u":"lang_corefunc.html#changes","x":"changes()","s":0},
{"u":"lang_corefunc.html#char","x":"char(X1,X2,...,XN)","s":0},
{"u":"lang_corefunc.html#coalesce","x":"coalesce(X,Y,...)","s":0},
{"u":"lang_corefunc.html#glob","x":"glob(X,Y)","s":0},
{"u":"lang_corefunc.html#hex","x":"hex(X)","s":0},
{"u":"lang_corefunc.html#ifnull","x":"ifnull(X,Y)","s":0},
{"u":"lang_corefunc.html#instr","x":"instr(X,Y)","s":0},







|

|

|







98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
<a href="lang_aggfunc.html">aggregate functions</a>, and
<a href="json1.html">JSON functions</a> are documented separately.  An
application may define additional
functions written in C and added to the database engine using
the <a href="c3ref/create_function.html">sqlite3_create_function()</a> API.</p>

<style>
#listtab30 tr td {vertical-align:top;}
</style>
<table id='listtab30' width='100%'></table>
<script>
var listitems30 = [{"u":"lang_corefunc.html#abs","x":"abs(X)","s":0},
{"u":"lang_corefunc.html#changes","x":"changes()","s":0},
{"u":"lang_corefunc.html#char","x":"char(X1,X2,...,XN)","s":0},
{"u":"lang_corefunc.html#coalesce","x":"coalesce(X,Y,...)","s":0},
{"u":"lang_corefunc.html#glob","x":"glob(X,Y)","s":0},
{"u":"lang_corefunc.html#hex","x":"hex(X)","s":0},
{"u":"lang_corefunc.html#ifnull","x":"ifnull(X,Y)","s":0},
{"u":"lang_corefunc.html#instr","x":"instr(X,Y)","s":0},
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
{"u":"lang_corefunc.html#unlikely","x":"unlikely(X)","s":0},
{"u":"lang_corefunc.html#upper","x":"upper(X)","s":0},
{"u":"lang_corefunc.html#zeroblob","x":"zeroblob(N)","s":0}];
var j = 0;
var w = Math.max(document.documentElement.clientWidth,  window.innerWidth || 0);
var nCol = Math.floor(w/225);
if(nCol<=0) nCol=1;
var nRow = Math.ceil((listitems28.length+1)/nCol);
var h="<tr><td><ul class='multicol_list'>"
var ea
for(var i=0; i<listitems28.length; i++){
  if( (++j)>nRow ){
    h += "</ul></td>\n<td><ul class='multicol_list'>\n";
    j = 1;
  }
  if(listitems28[i].u=="" || listitems28[i].s==2){
    h += "<li>"
    ea = ""
  }else{
    h += "<li><a href='";
    h += listitems28[i].u;
    h += "'>";
    ea = "</a>"
  }
  if(listitems28[i].s==2 || listitems28[i].s==3) h += "<s>"
  h += listitems28[i].x;
  if(listitems28[i].s==2 || listitems28[i].s==3) h += "</s>"
  h += ea
  if(listitems28[i].s==1) h += "<small><i>(exp)</i></small>\n";
  if(listitems28[i].s==3) h += "&sup1\n";
  if(listitems28[i].s==4) h += "&sup2\n";
  if(listitems28[i].s==5) h += "&sup3\n";
}
document.getElementById("listtab28").innerHTML = h;
</script>
<hr class='xhr'>
<dl>
<a name="abs"></a>
<dt><p><b>abs(<i>X</i>)</b></dt><dd><p>
  The abs(X) function returns the absolute value of the numeric
  argument X.  Abs(X) returns NULL if X is NULL. 







|


|




|




|



|
|
|

|
|
|
|

|







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
{"u":"lang_corefunc.html#unlikely","x":"unlikely(X)","s":0},
{"u":"lang_corefunc.html#upper","x":"upper(X)","s":0},
{"u":"lang_corefunc.html#zeroblob","x":"zeroblob(N)","s":0}];
var j = 0;
var w = Math.max(document.documentElement.clientWidth,  window.innerWidth || 0);
var nCol = Math.floor(w/225);
if(nCol<=0) nCol=1;
var nRow = Math.ceil((listitems30.length+1)/nCol);
var h="<tr><td><ul class='multicol_list'>"
var ea
for(var i=0; i<listitems30.length; i++){
  if( (++j)>nRow ){
    h += "</ul></td>\n<td><ul class='multicol_list'>\n";
    j = 1;
  }
  if(listitems30[i].u=="" || listitems30[i].s==2){
    h += "<li>"
    ea = ""
  }else{
    h += "<li><a href='";
    h += listitems30[i].u;
    h += "'>";
    ea = "</a>"
  }
  if(listitems30[i].s==2 || listitems30[i].s==3) h += "<s>"
  h += listitems30[i].x;
  if(listitems30[i].s==2 || listitems30[i].s==3) h += "</s>"
  h += ea
  if(listitems30[i].s==1) h += "<small><i>(exp)</i></small>\n";
  if(listitems30[i].s==3) h += "&sup1\n";
  if(listitems30[i].s==4) h += "&sup2\n";
  if(listitems30[i].s==5) h += "&sup3\n";
}
document.getElementById("listtab30").innerHTML = h;
</script>
<hr class='xhr'>
<dl>
<a name="abs"></a>
<dt><p><b>abs(<i>X</i>)</b></dt><dd><p>
  The abs(X) function returns the absolute value of the numeric
  argument X.  Abs(X) returns NULL if X is NULL. 
383
384
385
386
387
388
389
390

391
392
393
394
395
396
397
  function and the printf() function from the standard C library.
  The first argument is a format string that specifies how to construct the output
  string using values taken from subsequent arguments.  If the FORMAT argument is
  missing or NULL then the result is NULL.  The %n format is silently ignored and
  does not consume an argument.  The %p format is an alias for %X.  The %z format
  is interchangeable with %s.  If there are too few arguments in the argument list,
  missing arguments are assumed to have a NULL value, which is translated into
  0 or 0.0 for numeric formats or an empty string for %s.

</dd>
<a name="quote"></a>
<dt><p><b>quote(<i>X</i>)</b></dt><dd><p>
  The quote(X) function returns the text of an SQL literal which
  is the value of its argument suitable for inclusion into an SQL statement.
  Strings are surrounded by single-quotes with escapes on interior quotes
  as needed.  BLOBs are encoded as hexadecimal literals.







|
>







383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
  function and the printf() function from the standard C library.
  The first argument is a format string that specifies how to construct the output
  string using values taken from subsequent arguments.  If the FORMAT argument is
  missing or NULL then the result is NULL.  The %n format is silently ignored and
  does not consume an argument.  The %p format is an alias for %X.  The %z format
  is interchangeable with %s.  If there are too few arguments in the argument list,
  missing arguments are assumed to have a NULL value, which is translated into
  0 or 0.0 for numeric formats or an empty string for %s.  See the
  <a href="printf.html">built-in printf()</a> documentation for additional information.
</dd>
<a name="quote"></a>
<dt><p><b>quote(<i>X</i>)</b></dt><dd><p>
  The quote(X) function returns the text of an SQL literal which
  is the value of its argument suitable for inclusion into an SQL statement.
  Strings are surrounded by single-quotes with escapes on interior quotes
  as needed.  BLOBs are encoded as hexadecimal literals.
Changes to Doc/Extra/Core/lang_expr.html.
687
688
689
690
691
692
693











694
695
696
697
698
699
700
701
  <td> When casting a BLOB value to INTEGER, the value is first converted to
        TEXT.
       <p>When casting a TEXT value to INTEGER, the longest possible prefix of
        the value that can be interpreted as an integer number is extracted from
        the TEXT value and the remainder ignored. Any leading spaces in the
        TEXT value when converting from TEXT to INTEGER are ignored. If there
        is no prefix that can be interpreted as an integer number, the result











        of the conversion is 0.  The CAST operator understands decimal
        integers only &mdash; conversion of <a href="lang_expr.html#hexint">hexadecimal integers</a> stops 
        at the "x" in the "0x" prefix of the hexadecimal integer string 
        and thus result of the CAST is always zero.

      <p>A cast of a REAL value into an INTEGER results in the integer
      between the REAL value and zero that is closest to the REAL value.
      If a REAL is greater than the greatest possible signed







>
>
>
>
>
>
>
>
>
>
>
|







687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
  <td> When casting a BLOB value to INTEGER, the value is first converted to
        TEXT.
       <p>When casting a TEXT value to INTEGER, the longest possible prefix of
        the value that can be interpreted as an integer number is extracted from
        the TEXT value and the remainder ignored. Any leading spaces in the
        TEXT value when converting from TEXT to INTEGER are ignored. If there
        is no prefix that can be interpreted as an integer number, the result
        of the conversion is 0.  If the prefix integer is greater than
        +9223372036854775807 then the result of the cast is exactly
        +9223372036854775807.  Similarly, if the prefix integer is
        less than -9223372036854775808 then the result of the cast is
        exactly -9223372036854775808.

        <p>When casting to INTEGER, if the text looks like a floating point
        value with an exponent, the exponent will be ignored because it is
        no part of the integer prefix.  For example,
        "(CAST '123e+5' AS INTEGER)" results in 123, not in 12300000.

        <p> The CAST operator understands decimal
        integers only &mdash; conversion of <a href="lang_expr.html#hexint">hexadecimal integers</a> stops 
        at the "x" in the "0x" prefix of the hexadecimal integer string 
        and thus result of the CAST is always zero.

      <p>A cast of a REAL value into an INTEGER results in the integer
      between the REAL value and zero that is closest to the REAL value.
      If a REAL is greater than the greatest possible signed
751
752
753
754
755
756
757













758
759
760
761
762
763
764
<a href="lang_expr.html#castexpr">CAST expression</a>. A numeric zero value (integer value 0 or real 
value 0.0) is considered to be false.  A NULL value is still NULL.
All other values are considered true.

<p>For example, the values NULL, 0.0, 0, 'english' and '0' are all considered
to be false. Values 1, 1.0, 0.1, -0.1 and '1english' are considered to 
be true.














<h3>Functions</h3>
<p>SQLite supports many <a href="lang_corefunc.html">simple</a> and <a href="lang_aggfunc.html">aggregate</a>
SQL functions.  For presentation purposes, simple functions are further
subdivided into <a href="lang_corefunc.html">core functions</a> and <a href="lang_datefunc.html">date-time functions</a>.
Applications can add new functions, written in C/C++, using the
<a href="c3ref/create_function.html">sqlite3_create_function()</a> interface.







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







762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
<a href="lang_expr.html#castexpr">CAST expression</a>. A numeric zero value (integer value 0 or real 
value 0.0) is considered to be false.  A NULL value is still NULL.
All other values are considered true.

<p>For example, the values NULL, 0.0, 0, 'english' and '0' are all considered
to be false. Values 1, 1.0, 0.1, -0.1 and '1english' are considered to 
be true.

<p>Beginning with SQLite 3.23.0 (2018-04-02), SQLite recognizes the
identifiers "TRUE" and "FALSE" as boolean literals, if and only if those
identifiers are not already used for some other meaning.  If there already
exists columns or tables or other objects named TRUE or FALSE, then for
the sake of backwards compatibility, the TRUE and FALSE identifiers refer
to those other objects, not to the boolean values.

<p>The boolean identifiers TRUE and FALSE are usually just aliases for
the integer values 1 and 0, respectively.  However, if TRUE or FALSE
occur on the right-hand side of an IS operator, then they form new
unary postfix operators "IS TRUE" and "IS FALSE" which test the boolean
value of the operand on the left.

<h3>Functions</h3>
<p>SQLite supports many <a href="lang_corefunc.html">simple</a> and <a href="lang_aggfunc.html">aggregate</a>
SQL functions.  For presentation purposes, simple functions are further
subdivided into <a href="lang_corefunc.html">core functions</a> and <a href="lang_datefunc.html">date-time functions</a>.
Applications can add new functions, written in C/C++, using the
<a href="c3ref/create_function.html">sqlite3_create_function()</a> interface.
Changes to Doc/Extra/Core/pragma.html.
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
cannot use this feature.
</ul>


<hr /><a name="toc"></a>
<h2>List Of PRAGMAs</h2>
<style>
#listtab30 tr td {vertical-align:top;}
</style>
<table id='listtab30' width='100%'></table>
<script>
var listitems30 = [{"u":"pragma.html#pragma_application_id","x":"application_id","s":0},
{"u":"pragma.html#pragma_auto_vacuum","x":"auto_vacuum","s":0},
{"u":"pragma.html#pragma_automatic_index","x":"automatic_index","s":0},
{"u":"pragma.html#pragma_busy_timeout","x":"busy_timeout","s":0},
{"u":"pragma.html#pragma_cache_size","x":"cache_size","s":0},
{"u":"pragma.html#pragma_cache_spill","x":"cache_spill","s":0},
{"u":"pragma.html#pragma_case_sensitive_like","x":"case_sensitive_like","s":0},
{"u":"pragma.html#pragma_cell_size_check","x":"cell_size_check","s":0},







|

|

|







245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
cannot use this feature.
</ul>


<hr /><a name="toc"></a>
<h2>List Of PRAGMAs</h2>
<style>
#listtab32 tr td {vertical-align:top;}
</style>
<table id='listtab32' width='100%'></table>
<script>
var listitems32 = [{"u":"pragma.html#pragma_application_id","x":"application_id","s":0},
{"u":"pragma.html#pragma_auto_vacuum","x":"auto_vacuum","s":0},
{"u":"pragma.html#pragma_automatic_index","x":"automatic_index","s":0},
{"u":"pragma.html#pragma_busy_timeout","x":"busy_timeout","s":0},
{"u":"pragma.html#pragma_cache_size","x":"cache_size","s":0},
{"u":"pragma.html#pragma_cache_spill","x":"cache_spill","s":0},
{"u":"pragma.html#pragma_case_sensitive_like","x":"case_sensitive_like","s":0},
{"u":"pragma.html#pragma_cell_size_check","x":"cell_size_check","s":0},
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
{"u":"pragma.html#pragma_wal_autocheckpoint","x":"wal_autocheckpoint","s":0},
{"u":"pragma.html#pragma_wal_checkpoint","x":"wal_checkpoint","s":0},
{"u":"pragma.html#pragma_writable_schema","x":"writable_schema","s":5}];
var j = 0;
var w = Math.max(document.documentElement.clientWidth,  window.innerWidth || 0);
var nCol = Math.floor(w/250);
if(nCol<=0) nCol=1;
var nRow = Math.ceil((listitems30.length+1)/nCol);
var h="<tr><td><ul class='multicol_list'>"
var ea
for(var i=0; i<listitems30.length; i++){
  if( (++j)>nRow ){
    h += "</ul></td>\n<td><ul class='multicol_list'>\n";
    j = 1;
  }
  if(listitems30[i].u=="" || listitems30[i].s==2){
    h += "<li>"
    ea = ""
  }else{
    h += "<li><a href='";
    h += listitems30[i].u;
    h += "'>";
    ea = "</a>"
  }
  if(listitems30[i].s==2 || listitems30[i].s==3) h += "<s>"
  h += listitems30[i].x;
  if(listitems30[i].s==2 || listitems30[i].s==3) h += "</s>"
  h += ea
  if(listitems30[i].s==1) h += "<small><i>(exp)</i></small>\n";
  if(listitems30[i].s==3) h += "&sup1\n";
  if(listitems30[i].s==4) h += "&sup2\n";
  if(listitems30[i].s==5) h += "&sup3\n";
}
document.getElementById("listtab30").innerHTML = h;
</script>

<p>Notes:
<ol>
<li>Pragmas whose names are <s>struck through</s>
are deprecated. Do not use them. They exist
for historical compatibility.







|


|




|




|



|
|
|

|
|
|
|

|







321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
{"u":"pragma.html#pragma_wal_autocheckpoint","x":"wal_autocheckpoint","s":0},
{"u":"pragma.html#pragma_wal_checkpoint","x":"wal_checkpoint","s":0},
{"u":"pragma.html#pragma_writable_schema","x":"writable_schema","s":5}];
var j = 0;
var w = Math.max(document.documentElement.clientWidth,  window.innerWidth || 0);
var nCol = Math.floor(w/250);
if(nCol<=0) nCol=1;
var nRow = Math.ceil((listitems32.length+1)/nCol);
var h="<tr><td><ul class='multicol_list'>"
var ea
for(var i=0; i<listitems32.length; i++){
  if( (++j)>nRow ){
    h += "</ul></td>\n<td><ul class='multicol_list'>\n";
    j = 1;
  }
  if(listitems32[i].u=="" || listitems32[i].s==2){
    h += "<li>"
    ea = ""
  }else{
    h += "<li><a href='";
    h += listitems32[i].u;
    h += "'>";
    ea = "</a>"
  }
  if(listitems32[i].s==2 || listitems32[i].s==3) h += "<s>"
  h += listitems32[i].x;
  if(listitems32[i].s==2 || listitems32[i].s==3) h += "</s>"
  h += ea
  if(listitems32[i].s==1) h += "<small><i>(exp)</i></small>\n";
  if(listitems32[i].s==3) h += "&sup1\n";
  if(listitems32[i].s==4) h += "&sup2\n";
  if(listitems32[i].s==5) h += "&sup3\n";
}
document.getElementById("listtab32").innerHTML = h;
</script>

<p>Notes:
<ol>
<li>Pragmas whose names are <s>struck through</s>
are deprecated. Do not use them. They exist
for historical compatibility.
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
    The extra WAL sync following each transaction help ensure that 
    transactions are durable across a power loss.  Transactions are
    consistent with or without the extra syncs provided by
    synchronous=FULL.
    If durability is not a concern, then synchronous=NORMAL is normally
    all one needs in WAL mode.</p>

    <p>The default setting is usually synchronous=FULL.
    The <a href="compile.html#extra_durable">SQLITE_EXTRA_DURABLE</a> compile-time option changes the
    default to synchronous=EXTRA.</p>

    <p>The TEMP schema always has synchronous=OFF since the content of
    of TEMP is ephemeral and is not expected to survive a power outage.
    Attempts to change the synchronous setting for TEMP are
    silently ignored.

    <p>See also the <a href="pragma.html#pragma_fullfsync">fullfsync</a> and <a href="pragma.html#pragma_checkpoint_fullfsync">checkpoint_fullfsync</a> pragmas.</p>
<a name="pragma_table_info"></a>







<
<
<
<







1608
1609
1610
1611
1612
1613
1614




1615
1616
1617
1618
1619
1620
1621
    The extra WAL sync following each transaction help ensure that 
    transactions are durable across a power loss.  Transactions are
    consistent with or without the extra syncs provided by
    synchronous=FULL.
    If durability is not a concern, then synchronous=NORMAL is normally
    all one needs in WAL mode.</p>





    <p>The TEMP schema always has synchronous=OFF since the content of
    of TEMP is ephemeral and is not expected to survive a power outage.
    Attempts to change the synchronous setting for TEMP are
    silently ignored.

    <p>See also the <a href="pragma.html#pragma_fullfsync">fullfsync</a> and <a href="pragma.html#pragma_checkpoint_fullfsync">checkpoint_fullfsync</a> pragmas.</p>
<a name="pragma_table_info"></a>
Changes to Doc/Extra/Core/syntax.html.
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
</script>
</div>


<h1 align="center">List of SQLite Syntax Diagrams</h1>

<style>
#listtab36 tr td {vertical-align:top;}
</style>
<table id='listtab36' width='100%'></table>
<script>
var listitems36 = [{"u":"syntax/alter-table-stmt.html","x":"alter-table-stmt","s":0},
{"u":"syntax/analyze-stmt.html","x":"analyze-stmt","s":0},
{"u":"syntax/attach-stmt.html","x":"attach-stmt","s":0},
{"u":"syntax/begin-stmt.html","x":"begin-stmt","s":0},
{"u":"syntax/column-constraint.html","x":"column-constraint","s":0},
{"u":"syntax/column-def.html","x":"column-def","s":0},
{"u":"syntax/column-name-list.html","x":"column-name-list","s":0},
{"u":"syntax/comment-syntax.html","x":"comment-syntax","s":0},







|

|

|







92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
</script>
</div>


<h1 align="center">List of SQLite Syntax Diagrams</h1>

<style>
#listtab40 tr td {vertical-align:top;}
</style>
<table id='listtab40' width='100%'></table>
<script>
var listitems40 = [{"u":"syntax/alter-table-stmt.html","x":"alter-table-stmt","s":0},
{"u":"syntax/analyze-stmt.html","x":"analyze-stmt","s":0},
{"u":"syntax/attach-stmt.html","x":"attach-stmt","s":0},
{"u":"syntax/begin-stmt.html","x":"begin-stmt","s":0},
{"u":"syntax/column-constraint.html","x":"column-constraint","s":0},
{"u":"syntax/column-def.html","x":"column-def","s":0},
{"u":"syntax/column-name-list.html","x":"column-name-list","s":0},
{"u":"syntax/comment-syntax.html","x":"comment-syntax","s":0},
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
{"u":"syntax/update-stmt-limited.html","x":"update-stmt-limited","s":0},
{"u":"syntax/vacuum-stmt.html","x":"vacuum-stmt","s":0},
{"u":"syntax/with-clause.html","x":"with-clause","s":0}];
var j = 0;
var w = Math.max(document.documentElement.clientWidth,  window.innerWidth || 0);
var nCol = Math.floor(w/300);
if(nCol<=0) nCol=1;
var nRow = Math.ceil((listitems36.length+1)/nCol);
var h="<tr><td><ul class='multicol_list'>"
var ea
for(var i=0; i<listitems36.length; i++){
  if( (++j)>nRow ){
    h += "</ul></td>\n<td><ul class='multicol_list'>\n";
    j = 1;
  }
  if(listitems36[i].u=="" || listitems36[i].s==2){
    h += "<li>"
    ea = ""
  }else{
    h += "<li><a href='";
    h += listitems36[i].u;
    h += "'>";
    ea = "</a>"
  }
  if(listitems36[i].s==2 || listitems36[i].s==3) h += "<s>"
  h += listitems36[i].x;
  if(listitems36[i].s==2 || listitems36[i].s==3) h += "</s>"
  h += ea
  if(listitems36[i].s==1) h += "<small><i>(exp)</i></small>\n";
  if(listitems36[i].s==3) h += "&sup1\n";
  if(listitems36[i].s==4) h += "&sup2\n";
  if(listitems36[i].s==5) h += "&sup3\n";
}
document.getElementById("listtab36").innerHTML = h;
</script>









|


|




|




|



|
|
|

|
|
|
|

|



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
{"u":"syntax/update-stmt-limited.html","x":"update-stmt-limited","s":0},
{"u":"syntax/vacuum-stmt.html","x":"vacuum-stmt","s":0},
{"u":"syntax/with-clause.html","x":"with-clause","s":0}];
var j = 0;
var w = Math.max(document.documentElement.clientWidth,  window.innerWidth || 0);
var nCol = Math.floor(w/300);
if(nCol<=0) nCol=1;
var nRow = Math.ceil((listitems40.length+1)/nCol);
var h="<tr><td><ul class='multicol_list'>"
var ea
for(var i=0; i<listitems40.length; i++){
  if( (++j)>nRow ){
    h += "</ul></td>\n<td><ul class='multicol_list'>\n";
    j = 1;
  }
  if(listitems40[i].u=="" || listitems40[i].s==2){
    h += "<li>"
    ea = ""
  }else{
    h += "<li><a href='";
    h += listitems40[i].u;
    h += "'>";
    ea = "</a>"
  }
  if(listitems40[i].s==2 || listitems40[i].s==3) h += "<s>"
  h += listitems40[i].x;
  if(listitems40[i].s==2 || listitems40[i].s==3) h += "</s>"
  h += ea
  if(listitems40[i].s==1) h += "<small><i>(exp)</i></small>\n";
  if(listitems40[i].s==3) h += "&sup1\n";
  if(listitems40[i].s==4) h += "&sup2\n";
  if(listitems40[i].s==5) h += "&sup3\n";
}
document.getElementById("listtab40").innerHTML = h;
</script>