| 1 |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> |
| 2 |
<!-- |
| 3 |
Copyright 2004-2019 H2 Group. Multiple-Licensed under the MPL 2.0, |
| 4 |
and the EPL 1.0 (http://h2database.com/html/license.html). |
| 5 |
Initial Developer: H2 Group |
| 6 |
--> |
| 7 |
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"> |
| 8 |
<head><meta http-equiv="Content-Type" content="text/html;charset=utf-8" /> |
| 9 |
<meta name="viewport" content="width=device-width, initial-scale=1" /> |
| 10 |
<title> |
| 11 |
System Tables |
| 12 |
</title> |
| 13 |
<link rel="stylesheet" type="text/css" href="stylesheet.css" /> |
| 14 |
<!-- [search] { --> |
| 15 |
<script type="text/javascript" src="navigation.js"></script> |
| 16 |
</head><body onload="frameMe();"> |
| 17 |
<table class="content"><tr class="content"><td class="content"><div class="contentDiv"> |
| 18 |
<!-- } --> |
| 19 |
|
| 20 |
<h1>System Tables</h1> |
| 21 |
|
| 22 |
<p class="notranslate"> |
| 23 |
<a href="#information_schema">Information Schema</a><br /> |
| 24 |
<a href="#range_table">Range Table</a><br /> |
| 25 |
</p> |
| 26 |
|
| 27 |
<h2 id="information_schema" class="notranslate">Information Schema</h2> |
| 28 |
<p> |
| 29 |
The system tables in the schema <code>INFORMATION_SCHEMA</code> contain the meta data |
| 30 |
of all tables in the database as well as the current settings. |
| 31 |
</p> |
| 32 |
<c:forEach var="item" items="informationSchema"> |
| 33 |
<h3 class="notranslate">${item.topic}</h3> |
| 34 |
<p class="notranslate">${item.syntax}</p> |
| 35 |
</c:forEach> |
| 36 |
|
| 37 |
<h2 id="range_table" class="notranslate">Range Table</h2> |
| 38 |
<p> |
| 39 |
The range table is a dynamic system table that contains all values from a start to an end value. |
| 40 |
Non-zero step value may be also specified, default is 1. |
| 41 |
Start value, end value, and optional step value are converted to BIGINT data type. |
| 42 |
The table contains one column called X. |
| 43 |
If start value is greater than end value and step is positive the result is empty. |
| 44 |
If start value is less than end value and step is negative the result is empty too. |
| 45 |
If start value is equal to end value the result contains only start value. |
| 46 |
Start value, start value plus step, start value plus step multiplied by two and so on are included in result. |
| 47 |
If step is positive the last value is less than or equal to the specified end value. |
| 48 |
If step in negative the last value is greater than or equal to the specified end value. |
| 49 |
The table is used as follows: |
| 50 |
</p> |
| 51 |
<p>Examples:</p> |
| 52 |
<pre> |
| 53 |
SELECT X FROM SYSTEM_RANGE(1, 10); |
| 54 |
-- 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 |
| 55 |
SELECT X FROM SYSTEM_RANGE(1, 10, 2); |
| 56 |
-- 1, 3, 5, 7, 9 |
| 57 |
SELECT X FROM SYSTEM_RANGE(1, 10, -1); |
| 58 |
-- No rows |
| 59 |
SELECT X FROM SYSTEM_RANGE(10, 2, -2); |
| 60 |
-- 10, 8, 6, 4, 2 |
| 61 |
</pre> |
| 62 |
|
| 63 |
<!-- [close] { --></div></td></tr></table><!-- } --><!-- analytics --></body></html> |