| 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 Syntax: over-clause</title> |
| 7 |
<!-- path=../ --> |
| 8 |
</head> |
| 9 |
<body> |
| 10 |
<div class=nosearch> |
| 11 |
<a href="../index.html"> |
| 12 |
<img class="logo" src="../images/sqlite370_banner.gif" 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 |
<h1 align='center'>over-clause</h1> |
| 119 |
<div class='imgcontainer'> |
| 120 |
<div style="max-width:600px"><svg xmlns='http://www.w3.org/2000/svg' class="pikchr" viewBox="0 0 600.706 418.392"> |
| 121 |
<circle cx="5" cy="17" r="3.6" style="fill:none;stroke-width:2.16;stroke:rgb(0,0,0);" /> |
| 122 |
<polygon points="32,17 20,21 20,12" style="fill:rgb(0,0,0)"/> |
| 123 |
<path d="M9,17L26,17" style="fill:none;stroke-width:2.16;stroke:rgb(0,0,0);" /> |
| 124 |
<path d="M47,32L78,32A15 15 0 0 0 93 17A15 15 0 0 0 78 2L47,2A15 15 0 0 0 32 17A15 15 0 0 0 47 32Z" style="fill:none;stroke-width:2.16;stroke:rgb(0,0,0);" /> |
| 125 |
<text x="62" y="17" text-anchor="middle" fill="rgb(0,0,0)" dominant-baseline="central">OVER</text> |
| 126 |
<polygon points="129,17 117,21 117,12" style="fill:rgb(0,0,0)"/> |
| 127 |
<path d="M93,17L123,17" style="fill:none;stroke-width:2.16;stroke:rgb(0,0,0);" /> |
| 128 |
<path d="M144,32L241,32A15 15 0 0 0 256 17A15 15 0 0 0 241 2L144,2A15 15 0 0 0 129 17A15 15 0 0 0 144 32Z" style="fill:none;stroke-width:2.16;stroke:rgb(0,0,0);" /> |
| 129 |
<text x="192" y="17" text-anchor="middle" fill="rgb(0,0,0)" dominant-baseline="central">window-name</text> |
| 130 |
<polygon points="134,55 123,59 123,50" style="fill:rgb(0,0,0)"/> |
| 131 |
<path d="M93,17 L 100,17 Q 108,17 108,32 L 108,40 Q 108,55 118,55 L 129,55" style="fill:none;stroke-width:2.16;stroke:rgb(0,0,0);" /> |
| 132 |
<path d="M149,70A15 15 0 0 0 165 55L165,55A15 15 0 0 0 149 39A15 15 0 0 0 134 55L134,55A15 15 0 0 0 149 70Z" style="fill:none;stroke-width:2.16;stroke:rgb(0,0,0);" /> |
| 133 |
<text x="149" y="55" text-anchor="middle" font-weight="bold" fill="rgb(0,0,0)" dominant-baseline="central">(</text> |
| 134 |
<polygon points="206,82 195,86 195,77" style="fill:rgb(0,0,0)"/> |
| 135 |
<path d="M165,55 L 172,55 Q 180,55 180,68 Q 180,82 190,82 L 200,82" style="fill:none;stroke-width:2.16;stroke:rgb(0,0,0);" /> |
| 136 |
<path d="M221,97L363,97A15 15 0 0 0 378 82A15 15 0 0 0 363 67L221,67A15 15 0 0 0 206 82A15 15 0 0 0 221 97Z" style="fill:none;stroke-width:2.16;stroke:rgb(0,0,0);" /> |
| 137 |
<text x="292" y="82" text-anchor="middle" fill="rgb(0,0,0)" dominant-baseline="central">base-window-name</text> |
| 138 |
<path d="M221,173L301,173A15 15 0 0 0 316 157A15 15 0 0 0 301 142L221,142A15 15 0 0 0 206 157A15 15 0 0 0 221 173Z" style="fill:none;stroke-width:2.16;stroke:rgb(0,0,0);" /> |
| 139 |
<text x="261" y="157" text-anchor="middle" fill="rgb(0,0,0)" dominant-baseline="central">PARTITION</text> |
| 140 |
<polygon points="339,157 328,162 328,153" style="fill:rgb(0,0,0)"/> |
| 141 |
<path d="M316,157L333,157" style="fill:none;stroke-width:2.16;stroke:rgb(0,0,0);" /> |
| 142 |
<path d="M354,173L358,173A15 15 0 0 0 373 157A15 15 0 0 0 358 142L354,142A15 15 0 0 0 339 157A15 15 0 0 0 354 173Z" style="fill:none;stroke-width:2.16;stroke:rgb(0,0,0);" /> |
| 143 |
<text x="356" y="157" text-anchor="middle" fill="rgb(0,0,0)" dominant-baseline="central">BY</text> |
| 144 |
<polygon points="409,157 398,162 398,153" style="fill:rgb(0,0,0)"/> |
| 145 |
<path d="M373,157L404,157" style="fill:none;stroke-width:2.16;stroke:rgb(0,0,0);" /> |
| 146 |
<path d="M409,173L459,173L459,142L409,142Z" style="fill:none;stroke-width:2.16;stroke:rgb(0,0,0);" /> |
| 147 |
<text x="434" y="157" text-anchor="middle" fill="rgb(0,0,0)" dominant-baseline="central">expr</text> |
| 148 |
<path d="M434,210A15 15 0 0 0 449 195A15 15 0 0 0 434 180A15 15 0 0 0 419 195A15 15 0 0 0 434 210Z" style="fill:none;stroke-width:2.16;stroke:rgb(0,0,0);" /> |
| 149 |
<text x="434" y="195" text-anchor="middle" font-weight="bold" fill="rgb(0,0,0)" dominant-baseline="central">,</text> |
| 150 |
<polygon points="449,195 461,191 461,200" style="fill:rgb(0,0,0)"/> |
| 151 |
<path d="M459,157 L 466,157 Q 474,157 474,172 L 474,180 Q 474,195 464,195 L 455,195" style="fill:none;stroke-width:2.16;stroke:rgb(0,0,0);" /> |
| 152 |
<path d="M419,195 L 398,195 Q 383,195 383,180 L 383,172 Q 383,157 390,157 L 398,157" style="fill:none;stroke-width:2.16;stroke:rgb(0,0,0);" /> |
| 153 |
<polygon points="292,55 280,59 280,50" style="fill:rgb(0,0,0)"/> |
| 154 |
<path d="M165,55L286,55" style="fill:none;stroke-width:2.16;stroke:rgb(0,0,0);" /> |
| 155 |
<polygon points="292,120 304,115 304,124" style="fill:rgb(0,0,0)"/> |
| 156 |
<path d="M292,55 L 401,55 Q 416,55 416,70 L 416,105 Q 416,120 401,120 L 313,120 L 298,120" style="fill:none;stroke-width:2.16;stroke:rgb(0,0,0);" /> |
| 157 |
<polygon points="206,157 195,162 195,153" style="fill:rgb(0,0,0)"/> |
| 158 |
<path d="M292,120 L 180,120 Q 165,120 165,135 L 165,142 Q 165,157 180,157 L 185,157 L 200,157" style="fill:none;stroke-width:2.16;stroke:rgb(0,0,0);" /> |
| 159 |
<polygon points="401,82 389,86 389,77" style="fill:rgb(0,0,0)"/> |
| 160 |
<path d="M378,82L395,82" style="fill:none;stroke-width:2.16;stroke:rgb(0,0,0);" /> |
| 161 |
<path d="M401,82 L 408,82 Q 416,82 416,89 L 416,97" style="fill:none;stroke-width:2.16;stroke:rgb(0,0,0);" /> |
| 162 |
<path d="M221,286L266,286A15 15 0 0 0 281 271A15 15 0 0 0 266 256L221,256A15 15 0 0 0 206 271A15 15 0 0 0 221 286Z" style="fill:none;stroke-width:2.16;stroke:rgb(0,0,0);" /> |
| 163 |
<text x="244" y="271" text-anchor="middle" fill="rgb(0,0,0)" dominant-baseline="central">ORDER</text> |
| 164 |
<polygon points="304,271 292,275 292,266" style="fill:rgb(0,0,0)"/> |
| 165 |
<path d="M281,271L298,271" style="fill:none;stroke-width:2.16;stroke:rgb(0,0,0);" /> |
| 166 |
<path d="M319,286L323,286A15 15 0 0 0 338 271A15 15 0 0 0 323 256L319,256A15 15 0 0 0 304 271A15 15 0 0 0 319 286Z" style="fill:none;stroke-width:2.16;stroke:rgb(0,0,0);" /> |
| 167 |
<text x="321" y="271" text-anchor="middle" fill="rgb(0,0,0)" dominant-baseline="central">BY</text> |
| 168 |
<polygon points="374,271 363,275 363,266" style="fill:rgb(0,0,0)"/> |
| 169 |
<path d="M338,271L368,271" style="fill:none;stroke-width:2.16;stroke:rgb(0,0,0);" /> |
| 170 |
<path d="M374,286L504,286L504,256L374,256Z" style="fill:none;stroke-width:2.16;stroke:rgb(0,0,0);" /> |
| 171 |
<text x="439" y="271" text-anchor="middle" fill="rgb(0,0,0)" dominant-baseline="central">ordering-term</text> |
| 172 |
<path d="M439,324A15 15 0 0 0 454 309A15 15 0 0 0 439 293A15 15 0 0 0 424 309A15 15 0 0 0 439 324Z" style="fill:none;stroke-width:2.16;stroke:rgb(0,0,0);" /> |
| 173 |
<text x="439" y="309" text-anchor="middle" font-weight="bold" fill="rgb(0,0,0)" dominant-baseline="central">,</text> |
| 174 |
<polygon points="454,309 466,304 466,313" style="fill:rgb(0,0,0)"/> |
| 175 |
<path d="M504,271 L 512,271 Q 519,271 519,286 L 519,294 Q 519,309 504,309 L 475,309 L 460,309" style="fill:none;stroke-width:2.16;stroke:rgb(0,0,0);" /> |
| 176 |
<path d="M424,309 L 363,309 Q 348,309 348,294 L 348,286 Q 348,271 355,271 L 363,271" style="fill:none;stroke-width:2.16;stroke:rgb(0,0,0);" /> |
| 177 |
<polygon points="292,233 304,229 304,237" style="fill:rgb(0,0,0)"/> |
| 178 |
<path d="M459,157 L 466,157 Q 474,157 474,172 L 474,218 Q 474,233 459,233 L 313,233 L 298,233" style="fill:none;stroke-width:2.16;stroke:rgb(0,0,0);" /> |
| 179 |
<polygon points="206,271 195,275 195,266" style="fill:rgb(0,0,0)"/> |
| 180 |
<path d="M292,233 L 180,233 Q 165,233 165,248 L 165,256 Q 165,271 180,271 L 185,271 L 200,271" style="fill:none;stroke-width:2.16;stroke:rgb(0,0,0);" /> |
| 181 |
<polygon points="165,195 160,184 169,184" style="fill:rgb(0,0,0)"/> |
| 182 |
<path d="M165,142L165,189" style="fill:none;stroke-width:2.16;stroke:rgb(0,0,0);" /> |
| 183 |
<path d="M165,195L165,256" style="fill:none;stroke-width:2.16;stroke:rgb(0,0,0);" /> |
| 184 |
<path d="M206,399L311,399L311,369L206,369Z" style="fill:none;stroke-width:2.16;stroke:rgb(0,0,0);" /> |
| 185 |
<text x="258" y="384" text-anchor="middle" fill="rgb(0,0,0)" dominant-baseline="central">frame-spec</text> |
| 186 |
<polygon points="519,384 508,389 508,380" style="fill:rgb(0,0,0)"/> |
| 187 |
<path d="M311,384L513,384" style="fill:none;stroke-width:2.16;stroke:rgb(0,0,0);" /> |
| 188 |
<path d="M534,399A15 15 0 0 0 549 384A15 15 0 0 0 534 369A15 15 0 0 0 519 384A15 15 0 0 0 534 399Z" style="fill:none;stroke-width:2.16;stroke:rgb(0,0,0);" /> |
| 189 |
<text x="534" y="384" text-anchor="middle" font-weight="bold" fill="rgb(0,0,0)" dominant-baseline="central">)</text> |
| 190 |
<polygon points="591,17 579,21 579,12" style="fill:rgb(0,0,0)"/> |
| 191 |
<path d="M549,384 L 557,384 Q 564,384 564,369 L 564,32 Q 564,17 575,17 L 585,17" style="fill:none;stroke-width:2.16;stroke:rgb(0,0,0);" /> |
| 192 |
<circle cx="594" cy="17" r="3.6" style="fill:none;stroke-width:2.16;stroke:rgb(0,0,0);" /> |
| 193 |
<polygon points="519,17 508,21 508,12" style="fill:rgb(0,0,0)"/> |
| 194 |
<path d="M256,17L513,17" style="fill:none;stroke-width:2.16;stroke:rgb(0,0,0);" /> |
| 195 |
<path d="M519,17L579,17" style="fill:none;stroke-width:2.16;stroke:rgb(0,0,0);" /> |
| 196 |
<polygon points="292,346 304,342 304,351" style="fill:rgb(0,0,0)"/> |
| 197 |
<path d="M504,271 L 512,271 Q 519,271 519,286 L 519,331 Q 519,346 504,346 L 313,346 L 298,346" style="fill:none;stroke-width:2.16;stroke:rgb(0,0,0);" /> |
| 198 |
<polygon points="206,384 195,389 195,380" style="fill:rgb(0,0,0)"/> |
| 199 |
<path d="M292,346 L 180,346 Q 165,346 165,361 L 165,369 Q 165,384 180,384 L 185,384 L 200,384" style="fill:none;stroke-width:2.16;stroke:rgb(0,0,0);" /> |
| 200 |
<polygon points="165,309 160,297 169,297" style="fill:rgb(0,0,0)"/> |
| 201 |
<path d="M165,256L165,303" style="fill:none;stroke-width:2.16;stroke:rgb(0,0,0);" /> |
| 202 |
<path d="M165,309L165,369" style="fill:none;stroke-width:2.16;stroke:rgb(0,0,0);" /> |
| 203 |
<polygon points="258,411 247,416 247,407" style="fill:rgb(0,0,0)"/> |
| 204 |
<path d="M165,369 L 165,396 Q 165,411 180,411 L 238,411 L 253,411" style="fill:none;stroke-width:2.16;stroke:rgb(0,0,0);" /> |
| 205 |
<polygon points="380,384 369,389 369,380" style="fill:rgb(0,0,0)"/> |
| 206 |
<path d="M258,411 L 335,411 Q 350,411 350,398 Q 350,384 362,384 L 375,384" style="fill:none;stroke-width:2.16;stroke:rgb(0,0,0);" /> |
| 207 |
</svg> |
| 208 |
</div><br> |
| 209 |
|
| 210 |
Used by: <a href='./expr.html'>expr</a><br></br> |
| 211 |
References: <a href='./expr.html'>expr</a> <a href='./frame-spec.html'>frame-spec</a> <a href='./ordering-term.html'>ordering-term</a><br></br> |
| 212 |
See also: <a href='../lang_aggfunc.html'>lang_aggfunc.html</a> <a href='../lang_altertable.html'>lang_altertable.html</a> <a href='../lang_attach.html'>lang_attach.html</a> <a href='../lang_createindex.html'>lang_createindex.html</a> <a href='../lang_createtable.html'>lang_createtable.html</a> <a href='../lang_createtrigger.html'>lang_createtrigger.html</a> <a href='../lang_createview.html'>lang_createview.html</a> <a href='../lang_delete.html'>lang_delete.html</a> <a href='../lang_expr.html'>lang_expr.html</a> <a href='../lang_insert.html'>lang_insert.html</a> <a href='../lang_returning.html'>lang_returning.html</a> <a href='../lang_select.html'>lang_select.html</a> <a href='../lang_update.html'>lang_update.html</a> <a href='../lang_upsert.html'>lang_upsert.html</a> <a href='../lang_with.html'>lang_with.html</a> <a href='../partialindex.html'>partialindex.html</a> |
| 213 |
</div> |
| 214 |
|
| 215 |
|
| 216 |
|