| 1 |
<!DOCTYPE html> |
| 2 |
<html><head> |
| 3 |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> |
| 4 |
<meta http-equiv="content-type" content="text/html; charset=UTF-8"> |
| 5 |
<link href="sqlite.css" rel="stylesheet"> |
| 6 |
<title>SQLite Documentation</title> |
| 7 |
<!-- path= --> |
| 8 |
</head> |
| 9 |
<body> |
| 10 |
<div class=nosearch> |
| 11 |
<a href="index.html"> |
| 12 |
<img class="logo" src="images/sqlite370_banner.svg" alt="SQLite" border="0"> |
| 13 |
</a> |
| 14 |
<div><!-- IE hack to prevent disappearing logo --></div> |
| 15 |
<div class="tagline desktoponly"> |
| 16 |
Small. Fast. Reliable.<br>Choose any three. |
| 17 |
</div> |
| 18 |
<div class="menu mainmenu"> |
| 19 |
<ul> |
| 20 |
<li><a href="index.html">Home</a> |
| 21 |
<li class='mobileonly'><a href="javascript:void(0)" onclick='toggle_div("submenu")'>Menu</a> |
| 22 |
<li class='wideonly'><a href='about.html'>About</a> |
| 23 |
<li class='desktoponly'><a href="docs.html">Documentation</a> |
| 24 |
<li class='desktoponly'><a href="download.html">Download</a> |
| 25 |
<li class='wideonly'><a href='copyright.html'>License</a> |
| 26 |
<li class='desktoponly'><a href="support.html">Support</a> |
| 27 |
<li class='desktoponly'><a href="prosupport.html">Purchase</a> |
| 28 |
<li class='search' id='search_menubutton'> |
| 29 |
<a href="javascript:void(0)" onclick='toggle_search()'>Search</a> |
| 30 |
</ul> |
| 31 |
</div> |
| 32 |
<div class="menu submenu" id="submenu"> |
| 33 |
<ul> |
| 34 |
<li><a href='about.html'>About</a> |
| 35 |
<li><a href='docs.html'>Documentation</a> |
| 36 |
<li><a href='download.html'>Download</a> |
| 37 |
<li><a href='support.html'>Support</a> |
| 38 |
<li><a href='prosupport.html'>Purchase</a> |
| 39 |
</ul> |
| 40 |
</div> |
| 41 |
<div class="searchmenu" id="searchmenu"> |
| 42 |
<form method="GET" action="search"> |
| 43 |
<select name="s" id="searchtype"> |
| 44 |
<option value="d">Search Documentation</option> |
| 45 |
<option value="c">Search Changelog</option> |
| 46 |
</select> |
| 47 |
<input type="text" name="q" id="searchbox" value=""> |
| 48 |
<input type="submit" value="Go"> |
| 49 |
</form> |
| 50 |
</div> |
| 51 |
</div> |
| 52 |
<script> |
| 53 |
function toggle_div(nm) { |
| 54 |
var w = document.getElementById(nm); |
| 55 |
if( w.style.display=="block" ){ |
| 56 |
w.style.display = "none"; |
| 57 |
}else{ |
| 58 |
w.style.display = "block"; |
| 59 |
} |
| 60 |
} |
| 61 |
function toggle_search() { |
| 62 |
var w = document.getElementById("searchmenu"); |
| 63 |
if( w.style.display=="block" ){ |
| 64 |
w.style.display = "none"; |
| 65 |
} else { |
| 66 |
w.style.display = "block"; |
| 67 |
setTimeout(function(){ |
| 68 |
document.getElementById("searchbox").focus() |
| 69 |
}, 30); |
| 70 |
} |
| 71 |
} |
| 72 |
function div_off(nm){document.getElementById(nm).style.display="none";} |
| 73 |
window.onbeforeunload = function(e){div_off("submenu");} |
| 74 |
/* Disable the Search feature if we are not operating from CGI, since */ |
| 75 |
/* Search is accomplished using CGI and will not work without it. */ |
| 76 |
if( !location.origin || !location.origin.match || !location.origin.match(/http/) ){ |
| 77 |
document.getElementById("search_menubutton").style.display = "none"; |
| 78 |
} |
| 79 |
/* Used by the Hide/Show button beside syntax diagrams, to toggle the */ |
| 80 |
function hideorshow(btn,obj){ |
| 81 |
var x = document.getElementById(obj); |
| 82 |
var b = document.getElementById(btn); |
| 83 |
if( x.style.display!='none' ){ |
| 84 |
x.style.display = 'none'; |
| 85 |
b.innerHTML='show'; |
| 86 |
}else{ |
| 87 |
x.style.display = ''; |
| 88 |
b.innerHTML='hide'; |
| 89 |
} |
| 90 |
return false; |
| 91 |
} |
| 92 |
var antiRobot = 0; |
| 93 |
function antiRobotGo(){ |
| 94 |
if( antiRobot!=3 ) return; |
| 95 |
antiRobot = 7; |
| 96 |
var j = document.getElementById("mtimelink"); |
| 97 |
if(j && j.hasAttribute("data-href")) j.href=j.getAttribute("data-href"); |
| 98 |
} |
| 99 |
function antiRobotDefense(){ |
| 100 |
document.body.onmousedown=function(){ |
| 101 |
antiRobot |= 2; |
| 102 |
antiRobotGo(); |
| 103 |
document.body.onmousedown=null; |
| 104 |
} |
| 105 |
document.body.onmousemove=function(){ |
| 106 |
antiRobot |= 2; |
| 107 |
antiRobotGo(); |
| 108 |
document.body.onmousemove=null; |
| 109 |
} |
| 110 |
setTimeout(function(){ |
| 111 |
antiRobot |= 1; |
| 112 |
antiRobotGo(); |
| 113 |
}, 100) |
| 114 |
antiRobotGo(); |
| 115 |
} |
| 116 |
antiRobotDefense(); |
| 117 |
</script> |
| 118 |
|
| 119 |
|
| 120 |
|
| 121 |
<div class="rightsidebar desktoponly border2px"> |
| 122 |
<h3 align="center">Common Links</h3> |
| 123 |
<ul class=nounderline> |
| 124 |
<li> <a href="features.html">Features</a> </li> |
| 125 |
<li> <a href="whentouse.html">When to use SQLite</a> </li> |
| 126 |
<li> <a href="quickstart.html">Getting Started</a> </li> |
| 127 |
<li> <a href="https://sqlite.org/fiddle">Try it live!</li> |
| 128 |
<li> <a href="lang.html">SQL Syntax</a> |
| 129 |
<ul> |
| 130 |
<li> <a href="pragma.html#toc">Pragmas</a> |
| 131 |
<li> <a href="lang_corefunc.html">SQL functions</a> |
| 132 |
<li> <a href="lang_datefunc.html">Date & time functions</a> |
| 133 |
<li> <a href="lang_aggfunc.html#aggfunclist">Aggregate functions</a> |
| 134 |
<li> <a href="windowfunctions.html#biwinfunc">Window functions</a> |
| 135 |
<li> <a href="lang_mathfunc.html">Math functions</a> |
| 136 |
<li> <a href="json1.html">JSON functions</a> |
| 137 |
</ul> |
| 138 |
</li> |
| 139 |
<li> <a href="c3ref/intro.html">C/C++ Interface Spec</a> |
| 140 |
<ul> |
| 141 |
<li> <a href="cintro.html">Introduction</a> |
| 142 |
<li> <a href="c3ref/funclist.html">List of C-language APIs</a> |
| 143 |
</ul> |
| 144 |
</li> |
| 145 |
<li> <a href="tclsqlite.html">The TCL Interface Spec</a> |
| 146 |
<li> <a href="quirks.html">Quirks and Gotchas</a> </li> |
| 147 |
<li> <a href="faq.html">Frequently Asked Questions</a> </li> |
| 148 |
<li> <a href="https://www.sqlite.org/src/timeline">Commit History</a> </li> |
| 149 |
<li> <a href="chronology.html">Prior Releases</a> |
| 150 |
<li> <a href="https://www.sqlite.org/src/wiki?name=Bug+Reports">Bugs</a> </li> |
| 151 |
<li> <a href="news.html">News</a> </li> |
| 152 |
</ul> |
| 153 |
|
| 154 |
</div> |
| 155 |
|
| 156 |
<h2 align="center">Documentation</h1> |
| 157 |
<div class="docsearch" id="docsearch"> |
| 158 |
<form method="GET" action="./search"> |
| 159 |
<select name="s" id="searchtype"> |
| 160 |
<option value="d">Search Documentation</option> |
| 161 |
<option value="c">Search Changelog</option> |
| 162 |
</select> |
| 163 |
<input type="text" name="q" id="searchbox"> |
| 164 |
<input type="submit" value="Go"> |
| 165 |
</form> |
| 166 |
</div> |
| 167 |
<style> |
| 168 |
.showhide { |
| 169 |
margin-left: 0; |
| 170 |
padding-left: 0; |
| 171 |
list-style-type: none; |
| 172 |
} |
| 173 |
.showhide > li { |
| 174 |
padding-left: 1em; |
| 175 |
text-indent: -1em; |
| 176 |
} |
| 177 |
.showhide > li li { |
| 178 |
padding-left: 0; |
| 179 |
text-indent: 0; |
| 180 |
padding-top: 1ex; |
| 181 |
padding-bottom: 1ex; |
| 182 |
} |
| 183 |
.showhide ul { |
| 184 |
display: none; |
| 185 |
list-style-type: disc; |
| 186 |
} |
| 187 |
.showhide > li > a { |
| 188 |
text-decoration: none; |
| 189 |
color: black; |
| 190 |
cursor: pointer; |
| 191 |
} |
| 192 |
.sh_mark { |
| 193 |
width: 1em; |
| 194 |
} |
| 195 |
.sh_link { |
| 196 |
font-weight: bold; |
| 197 |
} |
| 198 |
.docsearch { |
| 199 |
margin: auto; |
| 200 |
width: 450px; |
| 201 |
padding-bottom: 1.5em; |
| 202 |
} |
| 203 |
</style> |
| 204 |
<script> |
| 205 |
function showhide(n){ |
| 206 |
var ul = document.getElementById("sh_sub_"+n) |
| 207 |
var mk = document.getElementById("sh_mark_"+n) |
| 208 |
if( ul.style.display!="block" ){ |
| 209 |
ul.style.display = "block"; |
| 210 |
mk.innerHTML = "▼"; |
| 211 |
} else { |
| 212 |
ul.style.display = "none"; |
| 213 |
mk.innerHTML = "►"; |
| 214 |
} |
| 215 |
} |
| 216 |
if( !location.origin || !location.origin.match || !location.origin.match(/http/) ){ |
| 217 |
document.getElementById("docsearch").style.display = "none"; |
| 218 |
} |
| 219 |
</script> |
| 220 |
|
| 221 |
<ul class="showhide"> |
| 222 |
<li><a onclick='showhide(1)'><span class='sh_mark' id='sh_mark_1'>▼</span> Document Lists And Indexes</a> |
| 223 |
<ul id='sh_sub_1' style='display:block;'> |
| 224 |
<li><a class='sh_link' href='doclist.html'>Alphabetical Listing Of All Documents</a> |
| 225 |
<li><a class='sh_link' href='keyword_index.html'>Website Keyword Index</a> |
| 226 |
<li><a class='sh_link' href='sitemap.html'>Permuted Title Index</a> |
| 227 |
</ul> |
| 228 |
<li><a onclick='showhide(2)'><span class='sh_mark' id='sh_mark_2'>►</span> Overview Documents</a> |
| 229 |
<ul id='sh_sub_2'> |
| 230 |
<li><a class='sh_link' href='about.html'>About SQLite</a> |
| 231 |
<span class='desktoponly'>→ |
| 232 |
A high-level overview of what SQLite is and why you might be |
| 233 |
interested in using it. |
| 234 |
</span> |
| 235 |
<li><a class='sh_link' href='whentouse.html'>Appropriate Uses For SQLite</a> |
| 236 |
<span class='desktoponly'>→ |
| 237 |
This document describes situations where SQLite is an appropriate |
| 238 |
database engine to use versus situations where a client/server |
| 239 |
database engine might be a better choice. |
| 240 |
</span> |
| 241 |
<li><a class='sh_link' href='different.html'>Distinctive Features</a> |
| 242 |
<span class='desktoponly'>→ |
| 243 |
This document enumerates and describes some of the features of |
| 244 |
SQLite that make it different from other SQL database engines. |
| 245 |
</span> |
| 246 |
<li><a class='sh_link' href='quirks.html'>Quirks of SQLite</a> |
| 247 |
<span class='desktoponly'>→ |
| 248 |
This document is a short list of some unusual features of SQLite |
| 249 |
that tend to cause misunderstandings and confusion. The list includes |
| 250 |
both deliberate innovations and "misfeatures" that are retained only |
| 251 |
for backwards compatibility. |
| 252 |
</span> |
| 253 |
<li><a class='sh_link' href='testing.html'>How SQLite Is Tested</a> |
| 254 |
<span class='desktoponly'>→ |
| 255 |
The reliability and robustness of SQLite is achieved in large part |
| 256 |
by thorough and careful testing. This document identifies the |
| 257 |
many tests that occur before every release of SQLite. |
| 258 |
</span> |
| 259 |
<li><a class='sh_link' href='copyright.html'>Copyright</a> |
| 260 |
<span class='desktoponly'>→ |
| 261 |
SQLite is in the public domain. This document describes what that means |
| 262 |
and the implications for contributors. |
| 263 |
</span> |
| 264 |
<li><a class='sh_link' href='faq.html'>Frequently Asked Questions</a> |
| 265 |
<span class='desktoponly'>→ |
| 266 |
The title of the document says all... |
| 267 |
</span> |
| 268 |
<li><a class='sh_link' href='books.html'>Books About SQLite</a> |
| 269 |
<span class='desktoponly'>→ |
| 270 |
A list of independently written books about SQLite. |
| 271 |
</span> |
| 272 |
</ul> |
| 273 |
<li><a onclick='showhide(3)'><span class='sh_mark' id='sh_mark_3'>►</span> Programming Interfaces</a> |
| 274 |
<ul id='sh_sub_3'> |
| 275 |
<li><a class='sh_link' href='quickstart.html'>SQLite In 5 Minutes Or Less</a> |
| 276 |
<span class='desktoponly'>→ |
| 277 |
A very quick introduction to programming with SQLite. |
| 278 |
</span> |
| 279 |
<li><a class='sh_link' href='cintro.html'>Introduction to the C/C++ API </a> |
| 280 |
<span class='desktoponly'>→ |
| 281 |
This document introduces the C/C++ API. Users should read this document |
| 282 |
before the C/C++ API Reference Guide linked below. |
| 283 |
</span> |
| 284 |
<li><a class='sh_link' href='howtocompile.html'>How To Compile SQLite</a> |
| 285 |
<span class='desktoponly'>→ |
| 286 |
Instructions and hints for compiling SQLite C code and integrating |
| 287 |
that code with your own application. |
| 288 |
</span> |
| 289 |
<li><a class='sh_link' href='c3ref/intro.html'>C/C++ API Reference</a> |
| 290 |
<span class='desktoponly'>→ |
| 291 |
This document describes each API function separately. |
| 292 |
</span> |
| 293 |
<li><a class='sh_link' href='rescode.html'>Result and Error Codes</a> |
| 294 |
<span class='desktoponly'>→ |
| 295 |
A description of the meanings of the numeric result codes |
| 296 |
returned by various C/C++ interfaces. |
| 297 |
</span> |
| 298 |
<li><a class='sh_link' href='appfunc.html'>Application-Defined SQL Function</a> |
| 299 |
<span class='desktoponly'>→ |
| 300 |
An overview of the C-language interfaces used to create new |
| 301 |
application-defined SQL functions in SQLite. |
| 302 |
</span> |
| 303 |
<li><a class='sh_link' href='tclsqlite.html'>Tcl API</a> |
| 304 |
<span class='desktoponly'>→ |
| 305 |
A description of the TCL interface bindings for SQLite. |
| 306 |
</span> |
| 307 |
<li><a class='sh_link' href='http://sqlite.org/android/'>SQLite Android Bindings</a> |
| 308 |
<span class='desktoponly'>→ |
| 309 |
Information on how to deploy your own private copy of SQLite on |
| 310 |
Android, bypassing the built-in SQLite, but using the same Java |
| 311 |
interface. |
| 312 |
</span> |
| 313 |
<li><a class='sh_link' href='http://system.data.sqlite.org/'>System.Data.SQLite</a> |
| 314 |
<span class='desktoponly'>→ |
| 315 |
C#/.NET bindings for SQLite |
| 316 |
</span> |
| 317 |
</ul> |
| 318 |
<li><a onclick='showhide(4)'><span class='sh_mark' id='sh_mark_4'>►</span> SQL Language Documentation</a> |
| 319 |
<ul id='sh_sub_4'> |
| 320 |
<li><a class='sh_link' href='lang.html'>SQL Syntax</a> |
| 321 |
<span class='desktoponly'>→ |
| 322 |
This document describes the SQL language that is understood by |
| 323 |
SQLite. |
| 324 |
</span> |
| 325 |
<li><a class='sh_link' href='pragma.html'>Pragma commands</a> |
| 326 |
<span class='desktoponly'>→ |
| 327 |
This document describes SQLite performance tuning options and other |
| 328 |
special purpose database commands. |
| 329 |
</span> |
| 330 |
<li><a class='sh_link' href='lang_corefunc.html'>Core SQL Functions</a> |
| 331 |
<span class='desktoponly'>→ |
| 332 |
General-purpose built-in scalar SQL functions. |
| 333 |
</span> |
| 334 |
<li><a class='sh_link' href='lang_aggfunc.html'>Aggregate SQL Functions</a> |
| 335 |
<span class='desktoponly'>→ |
| 336 |
General-purpose built-in aggregate SQL functions. |
| 337 |
</span> |
| 338 |
<li><a class='sh_link' href='lang_datefunc.html'>Date and Time SQL Functions</a> |
| 339 |
<span class='desktoponly'>→ |
| 340 |
SQL functions for manipulating dates and times. |
| 341 |
</span> |
| 342 |
<li><a class='sh_link' href='windowfunctions.html'>Window Functions</a> |
| 343 |
<span class='desktoponly'>→ |
| 344 |
SQL Window functions. |
| 345 |
</span> |
| 346 |
<li><a class='sh_link' href='gencol.html'>Generated Columns</a> |
| 347 |
<span class='desktoponly'>→ |
| 348 |
Stored and virtual columns in table definitions. |
| 349 |
</span> |
| 350 |
<li><a class='sh_link' href='datatype3.html'>DataTypes</a> |
| 351 |
<span class='desktoponly'>→ |
| 352 |
SQLite version 3 introduces the concept of manifest typing, where the |
| 353 |
type of a value is associated with the value itself, not the column that |
| 354 |
it is stored in. |
| 355 |
This page describes data typing for SQLite version 3 in further detail. |
| 356 |
</span> |
| 357 |
<li><a class='sh_link' href='expridx.html'>Indexes On Expressions</a> |
| 358 |
<span class='desktoponly'>→ |
| 359 |
Indexes in SQLite do not have to be over just plain table columns. |
| 360 |
Expressions can also be indexed. |
| 361 |
</span> |
| 362 |
<li><a class='sh_link' href='rowvalue.html'>Row Values</a> |
| 363 |
<span class='desktoponly'>→ |
| 364 |
SQLite supports comparisons, including inequality comparisons, between |
| 365 |
tuples of values, call "row values". This document explains. |
| 366 |
</span> |
| 367 |
<li><a class='sh_link' href='stricttables.html'>STRICT Tables</a> |
| 368 |
<span class='desktoponly'>→ |
| 369 |
A STRICT table in SQLite does rigid type enforcement, in order to more |
| 370 |
closely mimic the behavior of other SQL database engines. |
| 371 |
</span> |
| 372 |
</ul> |
| 373 |
<li><a onclick='showhide(5)'><span class='sh_mark' id='sh_mark_5'>►</span> Extensions</a> |
| 374 |
<ul id='sh_sub_5'> |
| 375 |
<li><a class='sh_link' href='json1.html'>JSON Functions</a> |
| 376 |
<span class='desktoponly'>→ |
| 377 |
SQL functions for creating, parsing, and querying JSON content. |
| 378 |
</span> |
| 379 |
<li><a class='sh_link' href='fts5.html'>FTS5 - Full Text Search</a> |
| 380 |
<span class='desktoponly'>→ |
| 381 |
A description of the SQLite Full Text Search (FTS5) extension. |
| 382 |
</span> |
| 383 |
<li><a class='sh_link' href='fts3.html'>FTS3 - Full Text Search</a> |
| 384 |
<span class='desktoponly'>→ |
| 385 |
A description of the SQLite Full Text Search (FTS3) extension. |
| 386 |
</span> |
| 387 |
<li><a class='sh_link' href='rtree.html'>R-Tree Module</a> |
| 388 |
<span class='desktoponly'>→ |
| 389 |
A description of the SQLite R-Tree extension. An R-Tree is a specialized |
| 390 |
data structure that supports fast multi-dimensional range queries often |
| 391 |
used in geospatial systems. |
| 392 |
</span> |
| 393 |
<li><a class='sh_link' href='sessionintro.html'>Sessions</a> |
| 394 |
<span class='desktoponly'>→ |
| 395 |
The Sessions extension allows change to an SQLite database to be |
| 396 |
captured in a compact file which can be reverted on the original |
| 397 |
database (to implement "undo") or transferred and applied to another |
| 398 |
similar database. |
| 399 |
</span> |
| 400 |
<li><a class='sh_link' href='loadext.html'>Run-Time Loadable Extensions</a> |
| 401 |
<span class='desktoponly'>→ |
| 402 |
A general overview on how run-time loadable extensions work, how they |
| 403 |
are compiled, and how developers can create their own run-time loadable |
| 404 |
extensions for SQLite. |
| 405 |
</span> |
| 406 |
<li><a class='sh_link' href='dbstat.html'>Dbstat Virtual Table</a> |
| 407 |
<span class='desktoponly'>→ |
| 408 |
The DBSTAT virtual table reports on the sizes and geometries of tables |
| 409 |
storing content in an SQLite database, and is the basis for the |
| 410 |
<a href="sqlanalyze.html">sqlite3_analyzer</a> utility program. |
| 411 |
</span> |
| 412 |
<li><a class='sh_link' href='csv.html'>Csv Virtual Table</a> |
| 413 |
<span class='desktoponly'>→ |
| 414 |
The CSV virtual table allows SQLite to directly read and query |
| 415 |
<a href="https://www.ietf.org/rfc/rfc4180.txt">RFC 4180</a> formatted files. |
| 416 |
</span> |
| 417 |
<li><a class='sh_link' href='carray.html'>Carray</a> |
| 418 |
<span class='desktoponly'>→ |
| 419 |
CARRAY is a <a href="vtab.html#tabfunc2">table-valued function</a> |
| 420 |
that allows C-language arrays to be used in SQL queries. |
| 421 |
</span> |
| 422 |
<li><a class='sh_link' href='series.html'>generate_series</a> |
| 423 |
<span class='desktoponly'>→ |
| 424 |
A description of the generate_series() |
| 425 |
<a href="vtab.html#tabfunc2">table-valued function</a>. |
| 426 |
</span> |
| 427 |
<li><a class='sh_link' href='spellfix1.html'>Spellfix1</a> |
| 428 |
<span class='desktoponly'>→ |
| 429 |
The spellfix1 extension is an experiment in doing spelling correction |
| 430 |
for <a href="fts3.html">full-text search</a>. |
| 431 |
</span> |
| 432 |
<li><a class='sh_link' href='zipfile.html'>Zipfile</a> |
| 433 |
<span class='desktoponly'>→ |
| 434 |
A [virtual table] with accompanying support functions that can |
| 435 |
read and write a ZIP archive as if it were a database. |
| 436 |
</span> |
| 437 |
<li><a class='sh_link' href='floatingpoint.html#the_ieee754_c_extension'>The IEEE754 Extension</a> |
| 438 |
<span class='desktoponly'>→ |
| 439 |
A set of SQL functions for encoding and decoding IEEE-754 floating |
| 440 |
point numbers. |
| 441 |
</span> |
| 442 |
<li><a class='sh_link' href='floatingpoint.html#the_decimal_c_extension'>The Decimal Extension</a> |
| 443 |
<span class='desktoponly'>→ |
| 444 |
A set of functions for doing arbitrary-precision decimal arithmetic, |
| 445 |
including expanding IEEE-754 floating point values to their exact |
| 446 |
decimal representation. |
| 447 |
</span> |
| 448 |
<li><a class='sh_link' href='uintcseq.html'>The UINT Collating Sequence</a> |
| 449 |
<span class='desktoponly'>→ |
| 450 |
A collating sequence that sorts text with embedded numbers in |
| 451 |
numeric order. |
| 452 |
</span> |
| 453 |
<li><a class='sh_link' href='percentile.html'>The Percentile Extension</a> |
| 454 |
<span class='desktoponly'>→ |
| 455 |
An implementation of aggregate functions: |
| 456 |
<a href="percentile.html#*medianfunc">median()</a>, |
| 457 |
<a href="percentile.html#*percentilefunc">percentile()</a>, |
| 458 |
<a href="percentile.html#*percentilecontfunc">percentile_cont()</a>, and |
| 459 |
<a href="percentile.html#*percentilediscfunc">percentile_disc()</a>. |
| 460 |
</span> |
| 461 |
</ul> |
| 462 |
<li><a onclick='showhide(6)'><span class='sh_mark' id='sh_mark_6'>►</span> Features</a> |
| 463 |
<ul id='sh_sub_6'> |
| 464 |
<li><a class='sh_link' href='shortnames.html'>8+3 Filenames</a> |
| 465 |
<span class='desktoponly'>→ |
| 466 |
How to make SQLite work on filesystems that only support |
| 467 |
8+3 filenames. |
| 468 |
</span> |
| 469 |
<li><a class='sh_link' href='autoinc.html'>Autoincrement</a> |
| 470 |
<span class='desktoponly'>→ |
| 471 |
A description of the AUTOINCREMENT keyword in SQLite, what it does, |
| 472 |
why it is sometimes useful, and why it should be avoided if not |
| 473 |
strictly necessary. |
| 474 |
</span> |
| 475 |
<li><a class='sh_link' href='backup.html'>Backup API</a> |
| 476 |
<span class='desktoponly'>→ |
| 477 |
The <a href="c3ref/backup_finish.html">online-backup interface</a> can be |
| 478 |
used to copy content from a disk file into an in-memory database or vice |
| 479 |
versa and it can make a hot backup of a live database. This application |
| 480 |
note gives examples of how. |
| 481 |
</span> |
| 482 |
<li><a class='sh_link' href='errlog.html'>Error and Warning Log</a> |
| 483 |
<span class='desktoponly'>→ |
| 484 |
SQLite supports an "error and warning log" design to capture information |
| 485 |
about suspicious and/or error events during operation. Embedded applications |
| 486 |
are encouraged to enable the error and warning log to help with debugging |
| 487 |
application problems that arise in the field. This document explains how |
| 488 |
to do that. |
| 489 |
</span> |
| 490 |
<li><a class='sh_link' href='foreignkeys.html'>Foreign Key Support</a> |
| 491 |
<span class='desktoponly'>→ |
| 492 |
This document describes the support for foreign key constraints introduced |
| 493 |
in version 3.6.19. |
| 494 |
</span> |
| 495 |
<li><a class='sh_link' href='expridx.html'>Indexes On Expressions</a> |
| 496 |
<span class='desktoponly'>→ |
| 497 |
Notes on how to create indexes on expressions instead of just |
| 498 |
individual columns. |
| 499 |
</span> |
| 500 |
<li><a class='sh_link' href='intern-v-extern-blob.html'>Internal versus External Blob Storage</a> |
| 501 |
<span class='desktoponly'>→ |
| 502 |
Should you store large BLOBs directly in the database, or store them |
| 503 |
in files and just record the filename in the database? This document |
| 504 |
seeks to shed light on that question. |
| 505 |
</span> |
| 506 |
<li><a class='sh_link' href='limits.html'>Limits In SQLite</a> |
| 507 |
<span class='desktoponly'>→ |
| 508 |
This document describes limitations of SQLite (the maximum length of a |
| 509 |
string or blob, the maximum size of a database, the maximum number of |
| 510 |
tables in a database, etc.) and how these limits can be altered at |
| 511 |
compile-time and run-time. |
| 512 |
</span> |
| 513 |
<li><a class='sh_link' href='mmap.html'>Memory-Mapped I/O</a> |
| 514 |
<span class='desktoponly'>→ |
| 515 |
SQLite supports memory-mapped I/O. Learn how to enable memory-mapped |
| 516 |
I/O and about the various advantages and disadvantages to using |
| 517 |
memory-mapped I/O in this document. |
| 518 |
</span> |
| 519 |
<li><a class='sh_link' href='threadsafe.html'>Multi-threaded Programs and SQLite</a> |
| 520 |
<span class='desktoponly'>→ |
| 521 |
SQLite is safe to use in multi-threaded programs. This document |
| 522 |
provides the details and hints on how to maximize performance. |
| 523 |
</span> |
| 524 |
<li><a class='sh_link' href='nulls.html'>Null Handling</a> |
| 525 |
<span class='desktoponly'>→ |
| 526 |
Different SQL database engines handle NULLs in different ways. The |
| 527 |
SQL standards are ambiguous. This (circa 2003) document describes |
| 528 |
how SQLite handles NULLs in comparison with other SQL database engines. |
| 529 |
</span> |
| 530 |
<li><a class='sh_link' href='partialindex.html'>Partial Indexes</a> |
| 531 |
<span class='desktoponly'>→ |
| 532 |
A partial index is an index that only covers a subset of the rows in |
| 533 |
a table. Learn how to use partial indexes in SQLite from this document. |
| 534 |
</span> |
| 535 |
<li><a class='sh_link' href='sharedcache.html'>Shared Cache Mode</a> |
| 536 |
<span class='desktoponly'>→ |
| 537 |
Version 3.3.0 and later supports the ability for two or more |
| 538 |
database connections to share the same page and schema cache. |
| 539 |
This feature is useful for certain specialized applications. |
| 540 |
</span> |
| 541 |
<li><a class='sh_link' href='unlock_notify.html'>Unlock Notify</a> |
| 542 |
<span class='desktoponly'>→ |
| 543 |
The "unlock notify" feature can be used in conjunction with |
| 544 |
<a href="sharedcache.html">shared cache mode</a> to more efficiently |
| 545 |
manage resource conflict (database table locks). |
| 546 |
</span> |
| 547 |
<li><a class='sh_link' href='uri.html'>URI Filenames</a> |
| 548 |
<span class='desktoponly'>→ |
| 549 |
The names of database files can be specified using either an ordinary |
| 550 |
filename or a URI. Using URI filenames provides additional capabilities, |
| 551 |
as this document describes. |
| 552 |
</span> |
| 553 |
<li><a class='sh_link' href='withoutrowid.html'>WITHOUT ROWID Tables</a> |
| 554 |
<span class='desktoponly'>→ |
| 555 |
The WITHOUT ROWID optimization is a option that can sometimes result |
| 556 |
in smaller and faster databases. |
| 557 |
</span> |
| 558 |
<li><a class='sh_link' href='wal.html'>Write-Ahead Log (WAL) Mode</a> |
| 559 |
<span class='desktoponly'>→ |
| 560 |
Transaction control using a write-ahead log offers more concurrency and |
| 561 |
is often faster than the default rollback transactions. This document |
| 562 |
explains how to use WAL mode for improved performance. |
| 563 |
</span> |
| 564 |
</ul> |
| 565 |
<li><a onclick='showhide(7)'><span class='sh_mark' id='sh_mark_7'>►</span> Tools</a> |
| 566 |
<ul id='sh_sub_7'> |
| 567 |
<li><a class='sh_link' href='cli.html'>Command-Line Shell (sqlite3.exe)</a> |
| 568 |
<span class='desktoponly'>→ |
| 569 |
Notes on using the "sqlite3.exe" command-line interface that |
| 570 |
can be used to create, modify, and query arbitrary SQLite |
| 571 |
database files. |
| 572 |
</span> |
| 573 |
<li><a class='sh_link' href='rsync.html'>Remote Copy Of A Live Database</a> |
| 574 |
<span class='desktoponly'>→ |
| 575 |
The <tt>sqlite3_rsync</tt> program makes a consistent copy of a |
| 576 |
live database to or from a remote system. |
| 577 |
</span> |
| 578 |
<li><a class='sh_link' href='dbhash.html'>Database Hash (dbhash.exe)</a> |
| 579 |
<span class='desktoponly'>→ |
| 580 |
This program demonstrates how to compute a hash over the content |
| 581 |
of an SQLite database. |
| 582 |
</span> |
| 583 |
<li><a class='sh_link' href='http://www.fossil-scm.org/'>Fossil</a> |
| 584 |
<span class='desktoponly'>→ |
| 585 |
The Fossil Version Control System is a distributed VCS designed specifically |
| 586 |
to support SQLite development. Fossil uses SQLite as for storage. |
| 587 |
</span> |
| 588 |
<li><a class='sh_link' href='rbu.html'>RBU</a> |
| 589 |
<span class='desktoponly'>→ |
| 590 |
The "Resumable Bulk Update" utility program allows a batch of changes |
| 591 |
to be applied to a remote database running on embedded hardware in a |
| 592 |
way that is resumeable and does not interrupt ongoing operation. |
| 593 |
</span> |
| 594 |
<li><a class='sh_link' href='sqlanalyze.html'>SQLite Database Analyzer (sqlite3_analyzer.exe)</a> |
| 595 |
<span class='desktoponly'>→ |
| 596 |
This stand-alone program reads an SQLite database and outputs a file |
| 597 |
showing the space used by each table and index and other statistics. |
| 598 |
Built using the <a href="dbstat.html">dbstat virtual table</a>. |
| 599 |
</span> |
| 600 |
<li><a class='sh_link' href='sqldiff.html'>SQLite Database Diff (sqldiff.exe)</a> |
| 601 |
<span class='desktoponly'>→ |
| 602 |
This stand-alone program compares two SQLite database files and |
| 603 |
outputs the SQL needed to convert one into the other. |
| 604 |
</span> |
| 605 |
<li><a class='sh_link' href='https://sqlite.org/sqlar/'>SQLite Archiver (sqlar.exe)</a> |
| 606 |
<span class='desktoponly'>→ |
| 607 |
A ZIP-like archive program that uses SQLite for storage. |
| 608 |
</span> |
| 609 |
</ul> |
| 610 |
<li><a onclick='showhide(8)'><span class='sh_mark' id='sh_mark_8'>►</span> Advocacy</a> |
| 611 |
<ul id='sh_sub_8'> |
| 612 |
<li><a class='sh_link' href='fasterthanfs.html'>35% Faster Than The Filesystem</a> |
| 613 |
<span class='desktoponly'>→ |
| 614 |
This article points out that reading blobs out of an SQLite database |
| 615 |
is often faster than reading the same blobs from individual files in |
| 616 |
the filesystem. |
| 617 |
</span> |
| 618 |
<li><a class='sh_link' href='flextypegood.html'>Flexible Typing Is A Feature</a> |
| 619 |
<span class='desktoponly'>→ |
| 620 |
SQLite provides developers with the freedom to store content in any |
| 621 |
desired format, regardless of the declared datatype of the column. |
| 622 |
This article explains why that is a feature, not a bug. |
| 623 |
</span> |
| 624 |
<li><a class='sh_link' href='appfileformat.html'>SQLite As An Application File Format</a> |
| 625 |
<span class='desktoponly'>→ |
| 626 |
This article advocates using SQLite as an application file format |
| 627 |
in place of XML or JSON or a "pile-of-file". |
| 628 |
</span> |
| 629 |
<li><a class='sh_link' href='famous.html'>Well Known Users</a> |
| 630 |
<span class='desktoponly'>→ |
| 631 |
This page lists a small subset of the many thousands of devices |
| 632 |
and application programs that make use of SQLite. |
| 633 |
</span> |
| 634 |
<li><a class='sh_link' href='whyc.html'>Why SQLite Is Coded In C</a> |
| 635 |
<span class='desktoponly'>→ |
| 636 |
Why is SQLite not coded in some other trendy language like C++ or |
| 637 |
Rust? Isn't C obsolete? |
| 638 |
</span> |
| 639 |
<li><a class='sh_link' href='whynotgit.html'>Why SQLite Does Not Use Git</a> |
| 640 |
<span class='desktoponly'>→ |
| 641 |
Why SQLite does not use Git for version control, like most everybody |
| 642 |
else? |
| 643 |
</span> |
| 644 |
</ul> |
| 645 |
<li><a onclick='showhide(9)'><span class='sh_mark' id='sh_mark_9'>►</span> Technical and Design Documentation</a> |
| 646 |
<ul id='sh_sub_9'> |
| 647 |
<li><a class='sh_link' href='howtocorrupt.html'>How Database Corruption Can Occur</a> |
| 648 |
<span class='desktoponly'>→ |
| 649 |
SQLite is highly resistant to database corruption. But application, |
| 650 |
OS, and hardware bugs can still result in corrupt database files. |
| 651 |
This article describes many of the ways that SQLite database files |
| 652 |
can go corrupt. |
| 653 |
</span> |
| 654 |
<li><a class='sh_link' href='security.html'>Defense Against Dark Arts</a> |
| 655 |
<span class='desktoponly'>→ |
| 656 |
Hints for avoiding application vulnerabilities when using SQLite. |
| 657 |
</span> |
| 658 |
<li><a class='sh_link' href='tempfiles.html'>Temporary Files Used By SQLite</a> |
| 659 |
<span class='desktoponly'>→ |
| 660 |
SQLite can potentially use many different temporary files when |
| 661 |
processing certain SQL statements. This document describes the |
| 662 |
many kinds of temporary files that SQLite uses and offers suggestions |
| 663 |
for avoiding them on systems where creating a temporary file is an |
| 664 |
expensive operation. |
| 665 |
</span> |
| 666 |
<li><a class='sh_link' href='inmemorydb.html'>In-Memory Databases</a> |
| 667 |
<span class='desktoponly'>→ |
| 668 |
SQLite normally stores content in a disk file. However, it can also |
| 669 |
be used as an in-memory database engine. This document explains how. |
| 670 |
</span> |
| 671 |
<li><a class='sh_link' href='atomiccommit.html'>How SQLite Implements Atomic Commit</a> |
| 672 |
<span class='desktoponly'>→ |
| 673 |
A description of the logic within SQLite that implements |
| 674 |
transactions with atomic commit, even in the face of power |
| 675 |
failures. |
| 676 |
</span> |
| 677 |
<li><a class='sh_link' href='malloc.html'>Dynamic Memory Allocation in SQLite</a> |
| 678 |
<span class='desktoponly'>→ |
| 679 |
SQLite has a sophisticated memory allocation subsystem that can be |
| 680 |
configured and customized to meet memory usage requirements of the |
| 681 |
application and that is robust against out-of-memory conditions and |
| 682 |
leak-free. This document provides the details. |
| 683 |
</span> |
| 684 |
<li><a class='sh_link' href='custombuild.html'>Customizing And Porting SQLite</a> |
| 685 |
<span class='desktoponly'>→ |
| 686 |
This document explains how to customize the build of SQLite and |
| 687 |
how to port SQLite to new platforms. |
| 688 |
</span> |
| 689 |
<li><a class='sh_link' href='lockingv3.html'>Locking And Concurrency In SQLite Version 3</a> |
| 690 |
<span class='desktoponly'>→ |
| 691 |
A description of how the new locking code in version 3 increases |
| 692 |
concurrency and decreases the problem of writer starvation. |
| 693 |
</span> |
| 694 |
<li><a class='sh_link' href='isolation.html'>Isolation In SQLite</a> |
| 695 |
<span class='desktoponly'>→ |
| 696 |
When we say that SQLite transactions are "serializable" what exactly |
| 697 |
does that mean? How and when are changes made visible within the |
| 698 |
same database connection and to other database connections? |
| 699 |
</span> |
| 700 |
<li><a class='sh_link' href='optoverview.html'>Overview Of The Optimizer</a> |
| 701 |
<span class='desktoponly'>→ |
| 702 |
A quick overview of the various query optimizations that are |
| 703 |
attempted by the SQLite code generator. |
| 704 |
</span> |
| 705 |
<li><a class='sh_link' href='queryplanner-ng.html'>The Next-Generation Query Planner</a> |
| 706 |
<span class='desktoponly'>→ |
| 707 |
Additional information about the SQLite query planner, and in particular |
| 708 |
the redesign of the query planner that occurred for version 3.8.0. |
| 709 |
</span> |
| 710 |
<li><a class='sh_link' href='arch.html'>Architecture</a> |
| 711 |
<span class='desktoponly'>→ |
| 712 |
An architectural overview of the SQLite library, useful for those who want |
| 713 |
to hack the code. |
| 714 |
</span> |
| 715 |
<li><a class='sh_link' href='opcode.html'>VDBE Opcodes</a> |
| 716 |
<span class='desktoponly'>→ |
| 717 |
This document is an automatically generated description of the various |
| 718 |
opcodes that the VDBE understands. Programmers can use this document as |
| 719 |
a reference to better understand the output of EXPLAIN listings from |
| 720 |
SQLite. |
| 721 |
</span> |
| 722 |
<li><a class='sh_link' href='vfs.html'>Virtual Filesystem</a> |
| 723 |
<span class='desktoponly'>→ |
| 724 |
The "VFS" object is the interface between the SQLite core and the |
| 725 |
underlying operating system. Learn more about how the VFS object |
| 726 |
works and how to create new VFS objects from this article. |
| 727 |
</span> |
| 728 |
<li><a class='sh_link' href='vtab.html'>Virtual Tables</a> |
| 729 |
<span class='desktoponly'>→ |
| 730 |
This article describes the virtual table mechanism and API in SQLite and how |
| 731 |
it can be used to add new capabilities to the core SQLite library. |
| 732 |
</span> |
| 733 |
<li><a class='sh_link' href='fileformat2.html'>The SQLite File Format</a> |
| 734 |
<span class='desktoponly'>→ |
| 735 |
A description of the format used for SQLite database and journal files, and |
| 736 |
other details required to create software to read and write SQLite |
| 737 |
databases without using SQLite. |
| 738 |
</span> |
| 739 |
<li><a class='sh_link' href='compile.html'>Compilation Options</a> |
| 740 |
<span class='desktoponly'>→ |
| 741 |
This document describes the compile time options that may be set to |
| 742 |
modify the default behavior of the library or omit optional features |
| 743 |
in order to reduce binary size. |
| 744 |
</span> |
| 745 |
<li><a class='sh_link' href='https://sqlite.org/android/'>Android Bindings for SQLite</a> |
| 746 |
<span class='desktoponly'>→ |
| 747 |
A description of how to compile your own SQLite for Android |
| 748 |
(bypassing the SQLite that is built into Android) together with |
| 749 |
code and makefiles. |
| 750 |
</span> |
| 751 |
<li><a class='sh_link' href='debugging.html'>Debugging Hints</a> |
| 752 |
<span class='desktoponly'>→ |
| 753 |
A list of tricks and techniques used to trace, examine, and understand |
| 754 |
the operation of the core SQLite library. |
| 755 |
</span> |
| 756 |
</ul> |
| 757 |
<li><a onclick='showhide(10)'><span class='sh_mark' id='sh_mark_10'>►</span> Upgrading SQLite, Backwards Compatibility</a> |
| 758 |
<ul id='sh_sub_10'> |
| 759 |
<li><a class='sh_link' href='35to36.html'>Moving From SQLite 3.5 to 3.6</a> |
| 760 |
<span class='desktoponly'>→ |
| 761 |
A document describing the differences between SQLite version 3.5.9 |
| 762 |
and 3.6.0. |
| 763 |
</span> |
| 764 |
<li><a class='sh_link' href='34to35.html'>Moving From SQLite 3.4 to 3.5</a> |
| 765 |
<span class='desktoponly'>→ |
| 766 |
A document describing the differences between SQLite version 3.4.2 |
| 767 |
and 3.5.0. |
| 768 |
</span> |
| 769 |
<li><a class='sh_link' href='changes.html'>Release History</a> |
| 770 |
<span class='desktoponly'>→ |
| 771 |
A chronology of SQLite releases going back to version 1.0.0 |
| 772 |
</span> |
| 773 |
<li><a class='sh_link' href='formatchng.html'>Backwards Compatibility</a> |
| 774 |
<span class='desktoponly'>→ |
| 775 |
This document details all of the incompatible changes to the SQLite |
| 776 |
file format that have occurred since version 1.0.0. |
| 777 |
</span> |
| 778 |
<li><a class='sh_link' href='privatebranch.html'>Private Branches</a> |
| 779 |
<span class='desktoponly'>→ |
| 780 |
This document suggests procedures for maintaining a private branch |
| 781 |
or fork of SQLite and keeping that branch or fork in sync with the |
| 782 |
public SQLite source tree. |
| 783 |
</span> |
| 784 |
</ul> |
| 785 |
<li><a onclick='showhide(11)'><span class='sh_mark' id='sh_mark_11'>►</span> Obsolete Documents</a> |
| 786 |
<ul id='sh_sub_11'> |
| 787 |
<li><a class='sh_link' href='asyncvfs.html'>Asynchronous IO Mode</a> |
| 788 |
<span class='desktoponly'>→ |
| 789 |
This page describes the asynchronous IO extension developed alongside |
| 790 |
SQLite. Using asynchronous IO can cause SQLite to appear more responsive |
| 791 |
by delegating database writes to a background thread. <i>NB: This |
| 792 |
extension is deprecated. <a href="wal.html">WAL mode</a> is recommended |
| 793 |
as a replacement.</i> |
| 794 |
</span> |
| 795 |
<li><a class='sh_link' href='c_interface.html'>Version 2 C/C++ API</a> |
| 796 |
<span class='desktoponly'>→ |
| 797 |
A description of the C/C++ interface bindings for SQLite through version |
| 798 |
2.8 |
| 799 |
</span> |
| 800 |
<li><a class='sh_link' href='datatypes.html'>Version 2 DataTypes </a> |
| 801 |
<span class='desktoponly'>→ |
| 802 |
A description of how SQLite version 2 handles SQL datatypes. |
| 803 |
Short summary: Everything is a string. |
| 804 |
</span> |
| 805 |
<li><a class='sh_link' href='vdbe.html'>VDBE Tutorial</a> |
| 806 |
<span class='desktoponly'>→ |
| 807 |
The VDBE is the subsystem within SQLite that does the actual work of |
| 808 |
executing SQL statements. This page describes the principles of operation |
| 809 |
for the VDBE in SQLite version 2.7. This is essential reading for anyone |
| 810 |
who want to modify the SQLite sources. |
| 811 |
</span> |
| 812 |
<li><a class='sh_link' href='version3.html'>SQLite Version 3</a> |
| 813 |
<span class='desktoponly'>→ |
| 814 |
A summary of the changes between SQLite version 2.8 and SQLite version 3.0. |
| 815 |
</span> |
| 816 |
<li><a class='sh_link' href='capi3.html'>Version 3 C/C++ API</a> |
| 817 |
<span class='desktoponly'>→ |
| 818 |
A summary of the API related changes between SQLite version 2.8 and |
| 819 |
SQLite version 3.0. |
| 820 |
</span> |
| 821 |
<li><a class='sh_link' href='speed.html'>Speed Comparison</a> |
| 822 |
<span class='desktoponly'>→ |
| 823 |
The speed of version 2.7.6 of SQLite is compared against PostgreSQL and |
| 824 |
MySQL. |
| 825 |
</span> |
| 826 |
</ul> |
| 827 |
|
| 828 |
</ul> |
| 829 |
<br clear="both"> |
| 830 |
|
| 831 |
|