grammar.html 6.1 KB
Newer Older
1 2
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<!--
3
Copyright 2004-2011 H2 Group. Multiple-Licensed under the H2 License, Version 1.0,
4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
and under the Eclipse Public License, Version 1.0
(http://h2database.com/html/license.html).
Initial Developer: H2 Group
-->
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head><meta http-equiv="Content-Type" content="text/html;charset=utf-8" /><title>
SQL Grammar
</title><link rel="stylesheet" type="text/css" href="stylesheet.css" />
<!-- [search] { -->
<script type="text/javascript" src="navigation.js"></script>
</head><body onload="frameMe();">
<table class="content"><tr class="content"><td class="content"><div class="contentDiv">
<!-- } -->

<h1>SQL Grammar</h1>
Thomas Mueller's avatar
Thomas Mueller committed
19 20
<h2>Index</h2>
<h3>Commands (Data Manipulation)</h3>
21
<!-- syntax-start
22
<p class="notranslate">
23 24 25
<c:forEach var="item" items="commandsDML">
    <a href="#${item.link}">${item.topic}</a><br />
</c:forEach>
26
</p>
27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46
syntax-end -->
<!-- railroad-start -->
<table class="notranslate index">
    <tr>
        <td class="index">
            <c:forEach var="item" items="commandsDML-0">
                <a href="#${item.link}" >${item.topic}</a><br />
            </c:forEach>
        </td><td class="index">
            <c:forEach var="item" items="commandsDML-1">
                <a href="#${item.link}" >${item.topic}</a><br />
            </c:forEach>
        </td><td class="index">
            <c:forEach var="item" items="commandsDML-2">
                <a href="#${item.link}" >${item.topic}</a><br />
            </c:forEach>
        </td>
    </tr>
</table>
<!-- railroad-end -->
47

Thomas Mueller's avatar
Thomas Mueller committed
48
<h3>Commands (Data Definition)</h3>
49
<!-- syntax-start
50
<p class="notranslate">
51 52 53
<c:forEach var="item" items="commandsDDL">
    <a href="#${item.link}">${item.topic}</a><br />
</c:forEach>
54
</p>
55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74
syntax-end -->
<!-- railroad-start -->
<table class="notranslate index">
    <tr>
        <td class="index">
            <c:forEach var="item" items="commandsDDL-0">
                <a href="#${item.link}" >${item.topic}</a><br />
            </c:forEach>
        </td><td class="index">
            <c:forEach var="item" items="commandsDDL-1">
                <a href="#${item.link}" >${item.topic}</a><br />
            </c:forEach>
        </td><td class="index">
            <c:forEach var="item" items="commandsDDL-2">
                <a href="#${item.link}" >${item.topic}</a><br />
            </c:forEach>
        </td>
    </tr>
</table>
<!-- railroad-end -->
75

Thomas Mueller's avatar
Thomas Mueller committed
76
<h3>Commands (Other)</h3>
77
<!-- syntax-start
78
<p class="notranslate">
79 80 81
<c:forEach var="item" items="commandsOther">
    <a href="#${item.link}">${item.topic}</a><br />
</c:forEach>
82
</p>
83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102
syntax-end -->
<!-- railroad-start -->
<table class="notranslate index">
    <tr>
        <td class="index">
            <c:forEach var="item" items="commandsOther-0">
                <a href="#${item.link}" >${item.topic}</a><br />
            </c:forEach>
        </td><td class="index">
            <c:forEach var="item" items="commandsOther-1">
                <a href="#${item.link}" >${item.topic}</a><br />
            </c:forEach>
        </td><td class="index">
            <c:forEach var="item" items="commandsOther-2">
                <a href="#${item.link}" >${item.topic}</a><br />
            </c:forEach>
        </td>
    </tr>
</table>
<!-- railroad-end -->
103

Thomas Mueller's avatar
Thomas Mueller committed
104
<h3>Other Grammar</h3>
105
<!-- syntax-start
106
<p class="notranslate">
107
<c:forEach var="item" items="otherGrammar">
108
    <a href="#${item.link}" >${item.topic}</a><br />
109
</c:forEach>
110
</p>
111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130
syntax-end -->
<!-- railroad-start -->
<table class="notranslate index">
    <tr>
        <td class="index">
            <c:forEach var="item" items="otherGrammar-0">
                <a href="#${item.link}" >${item.topic}</a><br />
            </c:forEach>
        </td><td class="index">
            <c:forEach var="item" items="otherGrammar-1">
                <a href="#${item.link}" >${item.topic}</a><br />
            </c:forEach>
        </td><td class="index">
            <c:forEach var="item" items="otherGrammar-2">
                <a href="#${item.link}" >${item.topic}</a><br />
            </c:forEach>
        </td>
    </tr>
</table>
<!-- railroad-end -->
131

Thomas Mueller's avatar
Thomas Mueller committed
132
<h3>System Tables</h3>
133
<p class="notranslate">
134 135
<a href="#information_schema">Information Schema</a><br />
<a href="#range_table">Range Table</a><br />
136
</p>
137

Thomas Mueller's avatar
Thomas Mueller committed
138 139 140 141 142
<!-- railroad-start -->
<h2>Details</h2>
<p>Click on the header to switch between railroad diagram and BNF.</p>
<!-- railroad-end -->

143
<c:forEach var="item" items="commands">
Thomas Mueller's avatar
Thomas Mueller committed
144
<h3 id="${item.link}" class="notranslate" onclick="switchBnf(this)">${item.topic}</h3>
145
<!-- railroad-start -->
Thomas Mueller's avatar
Thomas Mueller committed
146 147 148 149
<pre name="bnf" style="display: none">
${item.syntax}
</pre>
<div name="railroad">
150
${item.railroad}
Thomas Mueller's avatar
Thomas Mueller committed
151
</div>
152 153
<!-- railroad-end -->
<!-- syntax-start
154
<pre>
155 156
${item.syntax}
</pre>
157
syntax-end -->
158
<p>${item.text}</p>
159 160 161
<p>Example:</p>
<p class="notranslate">
${item.example}</p>
162 163 164
</c:forEach>

<c:forEach var="item" items="otherGrammar">
Thomas Mueller's avatar
Thomas Mueller committed
165
<h3 id="${item.link}" class="notranslate" onclick="switchBnf(this)">${item.topic}</h3>
166 167 168 169
<!-- railroad-start -->
${item.railroad}
<!-- railroad-end -->
<!-- syntax-start
170
<pre>
171 172
${item.syntax}
</pre>
173
syntax-end -->
174
<p>${item.text}</p>
175
<p>Example:</p>
176
<p class="notranslate">${item.example}</p>
177 178
</c:forEach>

179
<h3 id="information_schema" class="notranslate">Information Schema</h3>
180
<p>
181
The system tables in the schema <code>INFORMATION_SCHEMA</code> contain the meta data
182 183
of all tables in the database as well as the current settings.
</p>
184 185
<table class="main">
<tr><th>Table</th><th>Columns</th></tr>
186
<c:forEach var="item" items="informationSchema">
187 188 189 190
<tr class="notranslate">
    <td>${item.topic}</td>
    <td>${item.syntax}</td>
</tr>
191 192 193
</c:forEach>
</table>

194
<h3 id="range_table" class="notranslate">Range Table</h3>
195 196 197 198 199
<p>
The range table is a dynamic system table that contains all values from a start to an end value.
The table contains one column called X. Both the start and end values are included in the result.
The table is used as follows:
</p>
200
<p>Example:</p>
201
<pre>
202 203 204
SELECT X FROM SYSTEM_RANGE(1, 10);
</pre>

Thomas Mueller's avatar
Thomas Mueller committed
205 206
<!--[if lte IE 7]><script language="javascript">switchBnf(null);</script><![endif]-->

207
<!-- [close] { --></div></td></tr></table><!-- } --><!-- analytics --></body></html>