1
0
Fork 0
cl-sites/sqlite-doc-3440000/syntax/recursive-cte.html
2023-11-03 12:08:53 +01:00

170 lines
8 KiB
HTML

<!DOCTYPE html>
<html><head>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<link href="../sqlite.css" rel="stylesheet">
<title>SQLite Syntax: recursive-cte</title>
<!-- path=../ -->
</head>
<body>
<div class=nosearch>
<a href="../index.html">
<img class="logo" src="../images/sqlite370_banner.gif" alt="SQLite" border="0">
</a>
<div><!-- IE hack to prevent disappearing logo --></div>
<div class="tagline desktoponly">
Small. Fast. Reliable.<br>Choose any three.
</div>
<div class="menu mainmenu">
<ul>
<li><a href="../index.html">Home</a>
<li class='mobileonly'><a href="javascript:void(0)" onclick='toggle_div("submenu")'>Menu</a>
<li class='wideonly'><a href='../about.html'>About</a>
<li class='desktoponly'><a href="../docs.html">Documentation</a>
<li class='desktoponly'><a href="../download.html">Download</a>
<li class='wideonly'><a href='../copyright.html'>License</a>
<li class='desktoponly'><a href="../support.html">Support</a>
<li class='desktoponly'><a href="../prosupport.html">Purchase</a>
<li class='search' id='search_menubutton'>
<a href="javascript:void(0)" onclick='toggle_search()'>Search</a>
</ul>
</div>
<div class="menu submenu" id="submenu">
<ul>
<li><a href='../about.html'>About</a>
<li><a href='../docs.html'>Documentation</a>
<li><a href='../download.html'>Download</a>
<li><a href='../support.html'>Support</a>
<li><a href='../prosupport.html'>Purchase</a>
</ul>
</div>
<div class="searchmenu" id="searchmenu">
<form method="GET" action="../search">
<select name="s" id="searchtype">
<option value="d">Search Documentation</option>
<option value="c">Search Changelog</option>
</select>
<input type="text" name="q" id="searchbox" value="">
<input type="submit" value="Go">
</form>
</div>
</div>
<script>
function toggle_div(nm) {
var w = document.getElementById(nm);
if( w.style.display=="block" ){
w.style.display = "none";
}else{
w.style.display = "block";
}
}
function toggle_search() {
var w = document.getElementById("searchmenu");
if( w.style.display=="block" ){
w.style.display = "none";
} else {
w.style.display = "block";
setTimeout(function(){
document.getElementById("searchbox").focus()
}, 30);
}
}
function div_off(nm){document.getElementById(nm).style.display="none";}
window.onbeforeunload = function(e){div_off("submenu");}
/* Disable the Search feature if we are not operating from CGI, since */
/* Search is accomplished using CGI and will not work without it. */
if( !location.origin || !location.origin.match || !location.origin.match(/http/) ){
document.getElementById("search_menubutton").style.display = "none";
}
/* Used by the Hide/Show button beside syntax diagrams, to toggle the */
function hideorshow(btn,obj){
var x = document.getElementById(obj);
var b = document.getElementById(btn);
if( x.style.display!='none' ){
x.style.display = 'none';
b.innerHTML='show';
}else{
x.style.display = '';
b.innerHTML='hide';
}
return false;
}
var antiRobot = 0;
function antiRobotGo(){
if( antiRobot!=3 ) return;
antiRobot = 7;
var j = document.getElementById("mtimelink");
if(j && j.hasAttribute("data-href")) j.href=j.getAttribute("data-href");
}
function antiRobotDefense(){
document.body.onmousedown=function(){
antiRobot |= 2;
antiRobotGo();
document.body.onmousedown=null;
}
document.body.onmousemove=function(){
antiRobot |= 2;
antiRobotGo();
document.body.onmousemove=null;
}
setTimeout(function(){
antiRobot |= 1;
antiRobotGo();
}, 100)
antiRobotGo();
}
antiRobotDefense();
</script>
<h1 align='center'>recursive-cte</h1>
<div class='imgcontainer'>
<div style="max-width:874px"><svg xmlns='http://www.w3.org/2000/svg' class="pikchr" viewBox="0 0 874.291 72.36">
<circle cx="5" cy="17" r="3.6" style="fill:none;stroke-width:2.16;stroke:rgb(0,0,0);" />
<polygon points="32,17 20,21 20,12" style="fill:rgb(0,0,0)"/>
<path d="M9,17L26,17" style="fill:none;stroke-width:2.16;stroke:rgb(0,0,0);" />
<path d="M32,32L169,32L169,2L32,2Z" style="fill:none;stroke-width:2.16;stroke:rgb(0,0,0);" />
<text x="100" y="17" text-anchor="middle" fill="rgb(0,0,0)" dominant-baseline="central">cte-table-name</text>
<polygon points="192,17 180,21 180,12" style="fill:rgb(0,0,0)"/>
<path d="M169,17L186,17" style="fill:none;stroke-width:2.16;stroke:rgb(0,0,0);" />
<path d="M207,32L211,32A15 15 0 0 0 226 17A15 15 0 0 0 211 2L207,2A15 15 0 0 0 192 17A15 15 0 0 0 207 32Z" style="fill:none;stroke-width:2.16;stroke:rgb(0,0,0);" />
<text x="209" y="17" text-anchor="middle" fill="rgb(0,0,0)" dominant-baseline="central">AS</text>
<polygon points="249,17 237,21 237,12" style="fill:rgb(0,0,0)"/>
<path d="M226,17L243,17" style="fill:none;stroke-width:2.16;stroke:rgb(0,0,0);" />
<path d="M264,32A15 15 0 0 0 279 17A15 15 0 0 0 264 2A15 15 0 0 0 249 17A15 15 0 0 0 264 32Z" style="fill:none;stroke-width:2.16;stroke:rgb(0,0,0);" />
<text x="264" y="17" text-anchor="middle" font-weight="bold" fill="rgb(0,0,0)" dominant-baseline="central">(</text>
<polygon points="302,17 291,21 291,12" style="fill:rgb(0,0,0)"/>
<path d="M279,17L296,17" style="fill:none;stroke-width:2.16;stroke:rgb(0,0,0);" />
<path d="M317,32L403,32A15 15 0 0 0 418 17A15 15 0 0 0 403 2L317,2A15 15 0 0 0 302 17A15 15 0 0 0 317 32Z" style="fill:none;stroke-width:2.16;stroke:rgb(0,0,0);" />
<text x="360" y="17" text-anchor="middle" fill="rgb(0,0,0)" dominant-baseline="central">initial-select</text>
<polygon points="459,55 448,59 448,50" style="fill:rgb(0,0,0)"/>
<path d="M418,17 L 425,17 Q 433,17 433,32 L 433,40 Q 433,55 443,55 L 454,55" style="fill:none;stroke-width:2.16;stroke:rgb(0,0,0);" />
<path d="M474,70L518,70A15 15 0 0 0 533 55L533,55A15 15 0 0 0 518 39L474,39A15 15 0 0 0 459 55L459,55A15 15 0 0 0 474 70Z" style="fill:none;stroke-width:2.16;stroke:rgb(0,0,0);" />
<text x="496" y="55" text-anchor="middle" fill="rgb(0,0,0)" dominant-baseline="central">UNION</text>
<polygon points="556,55 545,59 545,50" style="fill:rgb(0,0,0)"/>
<path d="M533,55L550,55" style="fill:none;stroke-width:2.16;stroke:rgb(0,0,0);" />
<path d="M571,70L586,70A15 15 0 0 0 601 55L601,55A15 15 0 0 0 586 39L571,39A15 15 0 0 0 556 55L556,55A15 15 0 0 0 571 70Z" style="fill:none;stroke-width:2.16;stroke:rgb(0,0,0);" />
<text x="579" y="55" text-anchor="middle" fill="rgb(0,0,0)" dominant-baseline="central">ALL</text>
<polygon points="643,17 631,21 631,12" style="fill:rgb(0,0,0)"/>
<path d="M601,55 L 609,55 Q 616,55 616,40 L 616,32 Q 616,17 627,17 L 637,17" style="fill:none;stroke-width:2.16;stroke:rgb(0,0,0);" />
<path d="M658,32L773,32A15 15 0 0 0 788 17A15 15 0 0 0 773 2L658,2A15 15 0 0 0 643 17A15 15 0 0 0 658 32Z" style="fill:none;stroke-width:2.16;stroke:rgb(0,0,0);" />
<text x="715" y="17" text-anchor="middle" fill="rgb(0,0,0)" dominant-baseline="central">recursive-select</text>
<polygon points="811,17 800,21 800,12" style="fill:rgb(0,0,0)"/>
<path d="M788,17L805,17" style="fill:none;stroke-width:2.16;stroke:rgb(0,0,0);" />
<path d="M826,32A15 15 0 0 0 841 17A15 15 0 0 0 826 2A15 15 0 0 0 811 17A15 15 0 0 0 826 32Z" style="fill:none;stroke-width:2.16;stroke:rgb(0,0,0);" />
<text x="826" y="17" text-anchor="middle" font-weight="bold" fill="rgb(0,0,0)" dominant-baseline="central">)</text>
<polygon points="864,17 853,21 853,12" style="fill:rgb(0,0,0)"/>
<path d="M841,17L859,17" style="fill:none;stroke-width:2.16;stroke:rgb(0,0,0);" />
<circle cx="868" cy="17" r="3.6" style="fill:none;stroke-width:2.16;stroke:rgb(0,0,0);" />
<polygon points="459,17 448,21 448,12" style="fill:rgb(0,0,0)"/>
<path d="M418,17L454,17" style="fill:none;stroke-width:2.16;stroke:rgb(0,0,0);" />
<path d="M474,32L518,32A15 15 0 0 0 533 17A15 15 0 0 0 518 2L474,2A15 15 0 0 0 459 17A15 15 0 0 0 474 32Z" style="fill:none;stroke-width:2.16;stroke:rgb(0,0,0);" />
<text x="496" y="17" text-anchor="middle" fill="rgb(0,0,0)" dominant-baseline="central">UNION</text>
<path d="M533,17L631,17" style="fill:none;stroke-width:2.16;stroke:rgb(0,0,0);" />
</svg>
</div><br>
<br></br>
References:&nbsp;&nbsp; <a href='./cte-table-name.html'>cte-table-name</a><br></br>
See also:&nbsp;&nbsp; <a href='../lang_with.html'>lang_with.html</a>
</div>