Author: paul
Date: 2005-10-17 21:50:29 +0200 (Mon, 17 Oct 2005)
New Revision: 74
Log:
Help tag markup.
Modified:
trunk/refman-4.1/functions.xml
trunk/refman/functions.xml
Modified: trunk/refman/functions.xml
===================================================================
--- trunk/refman/functions.xml 2005-10-17 18:57:57 UTC (rev 73)
+++ trunk/refman/functions.xml 2005-10-17 19:50:29 UTC (rev 74)
@@ -650,7 +650,7 @@
<remark role="help-description-begin"/>
<para>
- Tests whether a value against a boolean value, where
+ Tests a value against a boolean value, where
<replaceable>boolean_value</replaceable> can be
<literal>TRUE</literal>, <literal>FALSE</literal>, or
<literal>UNKNOWN</literal>.
Modified: trunk/refman-4.1/functions.xml
===================================================================
--- trunk/refman-4.1/functions.xml 2005-10-17 18:57:57 UTC (rev 73)
+++ trunk/refman-4.1/functions.xml 2005-10-17 19:50:29 UTC (rev 74)
@@ -26,9 +26,7 @@
<primary>operators</primary>
</indexterm>
- <remark>
- help_category Functions
- </remark>
+ <remark role="help-category" condition="Functions"/>
<para>
Expressions can be used at several points in SQL statements, such as
@@ -182,9 +180,7 @@
<primary>comparison operators</primary>
</indexterm>
- <remark>
- help_category Comparison operators@Functions
- </remark>
+ <remark role="help-category" condition="Comparison operators@Functions"/>
<indexterm>
<primary>casts</primary>
@@ -330,10 +326,10 @@
<itemizedlist>
<listitem>
- <remark>
- description_for_help_topic =
- </remark>
+ <remark role="help-topic" condition="="/>
+ <remark role="help-description-begin"/>
+
<para>
<indexterm type="function">
<primary>= (equal)</primary>
@@ -350,13 +346,9 @@
Equal:
</para>
- <remark>
- end_description_for_help_topic
- </remark>
+ <remark role="help-description-end"/>
- <remark>
- example_for_help_topic =
- </remark>
+ <remark role="help-example" condition="="/>
<programlisting>
mysql> <userinput>SELECT 1 = 0;</userinput>
@@ -373,10 +365,10 @@
</listitem>
<listitem>
- <remark>
- description_for_help_topic <=>
- </remark>
+ <remark role="help-topic" condition="<=>"/>
+ <remark role="help-syntax-begin"/>
+
<para>
<indexterm>
<primary><literal>NULL</literal></primary>
@@ -390,6 +382,10 @@
<literal><=></literal>
</para>
+ <remark role="help-syntax-end"/>
+
+ <remark role="help-description-begin"/>
+
<para>
<literal>NULL</literal>-safe equal. This operator performs
an equality comparison like the <literal>=</literal>
@@ -400,13 +396,9 @@
<literal>NULL</literal>.
</para>
- <remark>
- end_description_for_help_topic
- </remark>
+ <remark role="help-description-end"/>
- <remark>
- example_for_help_topic <=>
- </remark>
+ <remark role="help-example" condition="<=>"/>
<programlisting>
mysql> <userinput>SELECT 1 <=> 1, NULL <=> NULL,
1 <=> NULL;</userinput>
@@ -421,10 +413,14 @@
</listitem>
<listitem>
- <remark>
- description_for_help_topic != <>
+ <remark role="help-topic" condition="!="/>
+
+ <remark role="help-keywords">
+ <>
</remark>
+ <remark role="help-syntax-begin"/>
+
<para>
<indexterm type="function">
<primary><> (not equal)</primary>
@@ -442,20 +438,20 @@
<primary>not equal (!=)</primary>
</indexterm>
- <literal><></literal>,
<literal>!=</literal>
+ <literal><></literal>
<literal>!=</literal>
</para>
+ <remark role="help-syntax-end"/>
+
+ <remark role="help-description-begin"/>
+
<para>
Not equal:
</para>
- <remark>
- end_description_for_help_topic
- </remark>
+ <remark role="help-description-end"/>
- <remark>
- example_for_help_topic !=
- </remark>
+ <remark role="help-example" condition="!="/>
<programlisting>
mysql> <userinput>SELECT '.01' <> '0.01';</userinput>
@@ -468,10 +464,10 @@
</listitem>
<listitem>
- <remark>
- description_for_help_topic <=
- </remark>
+ <remark role="help-topic" condition="<="/>
+ <remark role="help-syntax-begin"/>
+
<para>
<indexterm type="function">
<primary><= (less than or equal)</primary>
@@ -484,17 +480,17 @@
<literal><=</literal>
</para>
+ <remark role="help-syntax-end"/>
+
+ <remark role="help-description-begin"/>
+
<para>
Less than or equal:
</para>
- <remark>
- end_description_for_help_topic
- </remark>
+ <remark role="help-description-end"/>
- <remark>
- example_for_help_topic <=
- </remark>
+ <remark role="help-example" condition="<="/>
<programlisting>
mysql> <userinput>SELECT 0.1 <= 2;</userinput>
@@ -503,10 +499,10 @@
</listitem>
<listitem>
- <remark>
- description_for_help_topic <
- </remark>
+ <remark role="help-topic" condition="<"/>
+ <remark role="help-syntax-begin"/>
+
<para>
<indexterm type="function">
<primary>< (less than)</primary>
@@ -519,17 +515,17 @@
<literal><</literal>
</para>
+ <remark role="help-syntax-end"/>
+
+ <remark role="help-description-begin"/>
+
<para>
Less than:
</para>
- <remark>
- end_description_for_help_topic
- </remark>
+ <remark role="help-description-end"/>
- <remark>
- example_for_help_topic <
- </remark>
+ <remark role="help-example" condition="<"/>
<programlisting>
mysql> <userinput>SELECT 2 < 2;</userinput>
@@ -538,10 +534,10 @@
</listitem>
<listitem>
- <remark>
- description_for_help_topic >=
- </remark>
+ <remark role="help-topic" condition=">="/>
+ <remark role="help-syntax-begin"/>
+
<para>
<indexterm type="function">
<primary>>= (greater than or equal)</primary>
@@ -554,17 +550,17 @@
<literal>>=</literal>
</para>
+ <remark role="help-syntax-end"/>
+
+ <remark role="help-description-begin"/>
+
<para>
Greater than or equal:
</para>
- <remark>
- end_description_for_help_topic
- </remark>
+ <remark role="help-description-end"/>
- <remark>
- example_for_help_topic >=
- </remark>
+ <remark role="help-example" condition=">="/>
<programlisting>
mysql> <userinput>SELECT 2 >= 2;</userinput>
@@ -573,10 +569,10 @@
</listitem>
<listitem>
- <remark>
- description_for_help_topic >
- </remark>
+ <remark role="help-topic" condition=">"/>
+ <remark role="help-syntax-begin"/>
+
<para>
<indexterm type="function">
<primary>> (greater than)</primary>
@@ -589,17 +585,17 @@
<literal>></literal>
</para>
+ <remark role="help-syntax-end"/>
+
+ <remark role="help-description-begin"/>
+
<para>
Greater than:
</para>
- <remark>
- end_description_for_help_topic
- </remark>
+ <remark role="help-description-end"/>
- <remark>
- example_for_help_topic >
- </remark>
+ <remark role="help-example" condition=">"/>
<programlisting>
mysql> <userinput>SELECT 2 > 2;</userinput>
@@ -608,10 +604,14 @@
</listitem>
<listitem>
- <remark>
- description_for_help_topic IS NULL NULL IS
+ <remark role="help-topic" condition="IS NULL"/>
+
+ <remark role="help-keywords">
+ NULL IS
</remark>
+ <remark role="help-syntax-begin"/>
+
<para>
<indexterm>
<primary><literal>NULL</literal></primary>
@@ -626,20 +626,20 @@
<primary>IS NOT NULL</primary>
</indexterm>
- <literal>IS NULL</literal>, <literal>IS NOT
NULL</literal>
+ <literal>IS NULL</literal> <literal>IS NOT
NULL</literal>
</para>
+ <remark role="help-syntax-end"/>
+
+ <remark role="help-description-begin"/>
+
<para>
Tests whether a value is or is not <literal>NULL</literal>.
</para>
- <remark>
- end_description_for_help_topic
- </remark>
+ <remark role="help-description-end"/>
- <remark>
- example_for_help_topic IS NULL
- </remark>
+ <remark role="help-example" condition="IS NULL"/>
<programlisting>
mysql> <userinput>SELECT 1 IS NULL, 0 IS NULL, NULL IS
NULL;</userinput>
@@ -708,10 +708,14 @@
</listitem>
<listitem>
- <remark>
- description_for_help_topic BETWEEN AND BETWEEN AND
+ <remark role="help-topic" condition="BETWEEN AND"/>
+
+ <remark role="help-keywords">
+ BETWEEN AND
</remark>
+ <remark role="help-syntax-begin"/>
+
<para>
<indexterm type="function">
<primary>BETWEEN ... AND</primary>
@@ -722,6 +726,10 @@
<replaceable>max</replaceable></literal>
</para>
+ <remark role="help-syntax-end"/>
+
+ <remark role="help-description-begin"/>
+
<para>
If <replaceable>expr</replaceable> is greater than or equal
to <replaceable>min</replaceable> and
@@ -741,13 +749,9 @@
<replaceable>expr</replaceable> instead.
</para>
- <remark>
- end_description_for_help_topic
- </remark>
+ <remark role="help-description-end"/>
- <remark>
- example_for_help_topic BETWEEN AND
- </remark>
+ <remark role="help-example" condition="BETWEEN AND"/>
<programlisting>
mysql> <userinput>SELECT 1 BETWEEN 2 AND 3;</userinput>
@@ -762,10 +766,14 @@
</listitem>
<listitem>
- <remark>
- description_for_help_topic NOT BETWEEN
+ <remark role="help-topic" condition="NOT"/>
+
+ <remark role="help-keywords">
+ BETWEEN
</remark>
+ <remark role="help-syntax-begin"/>
+
<para>
<indexterm type="function">
<primary>NOT BETWEEN</primary>
@@ -776,6 +784,10 @@
<replaceable>max</replaceable></literal>
</para>
+ <remark role="help-syntax-end"/>
+
+ <remark role="help-description-begin"/>
+
<para>
This is the same as <literal>NOT
(<replaceable>expr</replaceable> BETWEEN
@@ -783,16 +795,14 @@
<replaceable>max</replaceable>)</literal>.
</para>
- <remark>
- end_description_for_help_topic
- </remark>
+ <remark role="help-description-end"/>
</listitem>
<listitem>
- <remark>
- description_for_help_topic COALESCE
- </remark>
+ <remark role="help-topic" condition="COALESCE"/>
+ <remark role="help-syntax-begin"/>
+
<para>
<indexterm>
<primary><literal>NULL</literal></primary>
@@ -806,18 +816,18 @@
<literal>COALESCE(<replaceable>value</replaceable>,...)</literal>
</para>
+ <remark role="help-syntax-end"/>
+
+ <remark role="help-description-begin"/>
+
<para>
Returns the first non-<literal>NULL</literal> value in the
list.
</para>
- <remark>
- end_description_for_help_topic
- </remark>
+ <remark role="help-description-end"/>
- <remark>
- example_for_help_topic COALESCE
- </remark>
+ <remark role="help-example" condition="COALESCE"/>
<programlisting>
mysql> <userinput>SELECT COALESCE(NULL,1);</userinput>
@@ -832,10 +842,10 @@
</listitem>
<listitem>
- <remark>
- description_for_help_topic GREATEST
- </remark>
+ <remark role="help-topic" condition="GREATEST"/>
+ <remark role="help-syntax-begin"/>
+
<para>
<indexterm type="function">
<primary>GREATEST()</primary>
@@ -844,19 +854,19 @@
<literal>GREATEST(<replaceable>value1</replaceable>,<replaceable>value2</replaceable>,...)</literal>
</para>
+ <remark role="help-syntax-end"/>
+
+ <remark role="help-description-begin"/>
+
<para>
With two or more arguments, returns the largest
(maximum-valued) argument. The arguments are compared using
the same rules as for <literal>LEAST()</literal>.
</para>
- <remark>
- end_description_for_help_topic
- </remark>
+ <remark role="help-description-end"/>
- <remark>
- example_for_help_topic GREATEST
- </remark>
+ <remark role="help-example" condition="GREATEST"/>
<programlisting>
mysql> <userinput>SELECT GREATEST(2,0);</userinput>
@@ -880,10 +890,10 @@
</listitem>
<listitem>
- <remark>
- description_for_help_topic IN
- </remark>
+ <remark role="help-topic" condition="IN"/>
+ <remark role="help-syntax-begin"/>
+
<para>
<indexterm type="function">
<primary>IN</primary>
@@ -893,6 +903,10 @@
(<replaceable>value</replaceable>,...)</literal>
</para>
+ <remark role="help-syntax-end"/>
+
+ <remark role="help-description-begin"/>
+
<para>
Returns <literal>1</literal> if
<replaceable>expr</replaceable> is any of the values in the
@@ -908,13 +922,9 @@
performed in case-sensitive fashion.
</para>
- <remark>
- end_description_for_help_topic
- </remark>
+ <remark role="help-description-end"/>
- <remark>
- example_for_help_topic IN
- </remark>
+ <remark role="help-example" condition="IN"/>
<programlisting>
mysql> <userinput>SELECT 2 IN (0,3,5,'wefwf');</userinput>
@@ -946,10 +956,14 @@
</listitem>
<listitem>
- <remark>
- description_for_help_topic NOT IN
+ <remark role="help-topic" condition="NOT"/>
+
+ <remark role="help-keywords">
+ IN
</remark>
+ <remark role="help-syntax-begin"/>
+
<para>
<indexterm type="function">
<primary>NOT IN</primary>
@@ -959,22 +973,24 @@
(<replaceable>value</replaceable>,...)</literal>
</para>
+ <remark role="help-syntax-end"/>
+
+ <remark role="help-description-begin"/>
+
<para>
This is the same as <literal>NOT
(<replaceable>expr</replaceable> IN
(<replaceable>value</replaceable>,...))</literal>.
</para>
- <remark>
- end_description_for_help_topic
- </remark>
+ <remark role="help-description-end"/>
</listitem>
<listitem>
- <remark>
- description_for_help_topic ISNULL
- </remark>
+ <remark role="help-topic" condition="ISNULL"/>
+ <remark role="help-syntax-begin"/>
+
<para>
<indexterm type="function">
<primary>ISNULL()</primary>
@@ -983,6 +999,10 @@
<literal>ISNULL(<replaceable>expr</replaceable>)</literal>
</para>
+ <remark role="help-syntax-end"/>
+
+ <remark role="help-description-begin"/>
+
<para>
If <replaceable>expr</replaceable> is
<literal>NULL</literal>, <literal>ISNULL()</literal>
returns
@@ -990,13 +1010,9 @@
<literal>0</literal>.
</para>
- <remark>
- end_description_for_help_topic
- </remark>
+ <remark role="help-description-end"/>
- <remark>
- example_for_help_topic ISNULL
- </remark>
+ <remark role="help-example" condition="ISNULL"/>
<programlisting>
mysql> <userinput>SELECT ISNULL(1+1);</userinput>
@@ -1018,10 +1034,10 @@
</listitem>
<listitem>
- <remark>
- description_for_help_topic INTERVAL
- </remark>
+ <remark role="help-topic" condition="INTERVAL"/>
+ <remark role="help-syntax-begin"/>
+
<para>
<indexterm type="function">
<primary>INTERVAL()</primary>
@@ -1030,6 +1046,10 @@
<literal>INTERVAL(<replaceable>N</replaceable>,<replaceable>N1</replaceable>,<replaceable>N2</replaceable>,<replaceable>N3</replaceable>,...)</literal>
</para>
+ <remark role="help-syntax-end"/>
+
+ <remark role="help-description-begin"/>
+
<para>
Returns <literal>0</literal> if
<replaceable>N</replaceable>
< <replaceable>N1</replaceable>,
<literal>1</literal> if
@@ -1045,13 +1065,9 @@
fast).
</para>
- <remark>
- end_description_for_help_topic
- </remark>
+ <remark role="help-description-end"/>
- <remark>
- example_for_help_topic INTERVAL
- </remark>
+ <remark role="help-example" condition="INTERVAL"/>
<programlisting>
mysql> <userinput>SELECT INTERVAL(23, 1, 15, 17, 30, 44,
200);</userinput>
@@ -1064,10 +1080,10 @@
</listitem>
<listitem>
- <remark>
- description_for_help_topic LEAST
- </remark>
+ <remark role="help-topic" condition="LEAST"/>
+ <remark role="help-syntax-begin"/>
+
<para>
<indexterm type="function">
<primary>LEAST()</primary>
@@ -1076,6 +1092,10 @@
<literal>LEAST(<replaceable>value1</replaceable>,<replaceable>value2</replaceable>,...)</literal>
</para>
+ <remark role="help-syntax-end"/>
+
+ <remark role="help-description-begin"/>
+
<para>
With two or more arguments, returns the smallest
(minimum-valued) argument. The arguments are compared using
@@ -1116,13 +1136,9 @@
</itemizedlist>
- <remark>
- end_description_for_help_topic
- </remark>
+ <remark role="help-description-end"/>
- <remark>
- example_for_help_topic LEAST
- </remark>
+ <remark role="help-example" condition="LEAST"/>
<programlisting>
mysql> <userinput>SELECT LEAST(2,0);</userinput>
@@ -1178,9 +1194,7 @@
<secondary>logical</secondary>
</indexterm>
- <remark>
- help_category Logical operators@Functions
- </remark>
+ <remark role="help-category" condition="Logical operators@Functions"/>
<para>
In SQL, all logical operators evaluate to TRUE, FALSE, or
@@ -1194,10 +1208,14 @@
<itemizedlist>
<listitem>
- <remark>
- description_for_help_topic ! NOT
+ <remark role="help-topic" condition="!"/>
+
+ <remark role="help-keywords">
+ NOT
</remark>
+ <remark role="help-syntax-begin"/>
+
<para>
<indexterm type="function">
<primary>NOT</primary>
@@ -1208,9 +1226,13 @@
<primary>! (logical NOT)</primary>
</indexterm>
- <literal>NOT</literal>, <literal>!</literal>
+ <literal>NOT</literal> <literal>!</literal>
</para>
+ <remark role="help-syntax-end"/>
+
+ <remark role="help-description-begin"/>
+
<para>
Logical NOT. Evaluates to <literal>1</literal> if the
operand is <literal>0</literal>, to
<literal>0</literal> if
@@ -1218,13 +1240,9 @@
returns <literal>NULL</literal>.
</para>
- <remark>
- end_description_for_help_topic
- </remark>
+ <remark role="help-description-end"/>
- <remark>
- example_for_help_topic !
- </remark>
+ <remark role="help-example" condition="!"/>
<programlisting>
mysql> <userinput>SELECT NOT 10;</userinput>
@@ -1247,10 +1265,14 @@
</listitem>
<listitem>
- <remark>
- description_for_help_topic && AND
+ <remark role="help-topic" condition="&&"/>
+
+ <remark role="help-keywords">
+ AND
</remark>
+ <remark role="help-syntax-begin"/>
+
<para>
<indexterm type="function">
<primary>AND</primary>
@@ -1261,9 +1283,13 @@
<primary>&& (logical AND)</primary>
</indexterm>
- <literal>AND</literal>,
<literal>&&</literal>
+ <literal>AND</literal>
<literal>&&</literal>
</para>
+ <remark role="help-syntax-end"/>
+
+ <remark role="help-description-begin"/>
+
<para>
Logical AND. Evaluates to <literal>1</literal> if all
operands are non-zero and not <literal>NULL</literal>, to
@@ -1272,13 +1298,9 @@
returned.
</para>
- <remark>
- end_description_for_help_topic
- </remark>
+ <remark role="help-description-end"/>
- <remark>
- example_for_help_topic &&
- </remark>
+ <remark role="help-example" condition="&&"/>
<programlisting>
mysql> <userinput>SELECT 1 && 1;</userinput>
@@ -1307,10 +1329,14 @@
</listitem>
<listitem>
- <remark>
- description_for_help_topic || OR
+ <remark role="help-topic" condition="||"/>
+
+ <remark role="help-keywords">
+ OR
</remark>
+ <remark role="help-syntax-begin"/>
+
<para>
<indexterm type="function">
<primary>OR</primary>
@@ -1321,9 +1347,13 @@
<primary>|| (logical OR)</primary>
</indexterm>
- <literal>OR</literal>, <literal>||</literal>
+ <literal>OR</literal> <literal>||</literal>
</para>
+ <remark role="help-syntax-end"/>
+
+ <remark role="help-description-begin"/>
+
<para>
Logical OR. When both operands are
non-<literal>NULL</literal>, the result is
@@ -1336,13 +1366,9 @@
<literal>NULL</literal>.
</para>
- <remark>
- end_description_for_help_topic
- </remark>
+ <remark role="help-description-end"/>
- <remark>
- example_for_help_topic ||
- </remark>
+ <remark role="help-example" condition="||"/>
<programlisting>
mysql> <userinput>SELECT 1 || 1;</userinput>
@@ -1359,10 +1385,10 @@
</listitem>
<listitem>
- <remark>
- description_for_help_topic XOR
- </remark>
+ <remark role="help-topic" condition="XOR"/>
+ <remark role="help-syntax-begin"/>
+
<para>
<indexterm type="function">
<primary>XOR</primary>
@@ -1372,6 +1398,10 @@
<literal>XOR</literal>
</para>
+ <remark role="help-syntax-end"/>
+
+ <remark role="help-description-begin"/>
+
<para>
Logical XOR. Returns <literal>NULL</literal> if either
operand is <literal>NULL</literal>. For
@@ -1380,13 +1410,9 @@
non-zero, otherwise <literal>0</literal> is returned.
</para>
- <remark>
- end_description_for_help_topic
- </remark>
+ <remark role="help-description-end"/>
- <remark>
- example_for_help_topic XOR
- </remark>
+ <remark role="help-example" condition="XOR"/>
<programlisting>
mysql> <userinput>SELECT 1 XOR 1;</userinput>
@@ -1428,17 +1454,19 @@
<secondary>control flow</secondary>
</indexterm>
- <remark>
- help_category Control flow functions@Functions
- </remark>
+ <remark role="help-category" condition="Control flow functions@Functions"/>
<itemizedlist>
<listitem>
- <remark>
- description_for_help_topic CASE WHEN THEN ELSE END
+ <remark role="help-topic" condition="CASE"/>
+
+ <remark role="help-keywords">
+ WHEN THEN ELSE END
</remark>
+ <remark role="help-syntax-begin"/>
+
<para>
<indexterm type="function">
<primary>CASE</primary>
@@ -1449,14 +1477,18 @@
<replaceable>result</replaceable> [WHEN
[<replaceable>compare-value</replaceable>] THEN
<replaceable>result</replaceable> ...] [ELSE
- <replaceable>result</replaceable>] END</literal>,
- <literal>CASE WHEN [<replaceable>condition</replaceable>]
THEN
+ <replaceable>result</replaceable>] END</literal>
<literal>CASE
+ WHEN [<replaceable>condition</replaceable>] THEN
<replaceable>result</replaceable> [WHEN
[<replaceable>condition</replaceable>] THEN
<replaceable>result</replaceable> ...] [ELSE
<replaceable>result</replaceable>] END</literal>
</para>
+ <remark role="help-syntax-end"/>
+
+ <remark role="help-description-begin"/>
+
<para>
The first version returns the
<replaceable>result</replaceable> where
@@ -1468,13 +1500,9 @@
part.
</para>
- <remark>
- end_description_for_help_topic
- </remark>
+ <remark role="help-description-end"/>
- <remark>
- example_for_help_topic CASE
- </remark>
+ <remark role="help-example" condition="CASE"/>
<programlisting>
mysql> <userinput>SELECT CASE 1 WHEN 1 THEN 'one'</userinput>
@@ -1510,10 +1538,10 @@
</listitem>
<listitem>
- <remark>
- description_for_help_topic IF
- </remark>
+ <remark role="help-topic" condition="IF"/>
+ <remark role="help-syntax-begin"/>
+
<para>
<indexterm type="function">
<primary>IF()</primary>
@@ -1522,6 +1550,10 @@
<literal>IF(<replaceable>expr1</replaceable>,<replaceable>expr2</replaceable>,<replaceable>expr3</replaceable>)</literal>
</para>
+ <remark role="help-syntax-end"/>
+
+ <remark role="help-description-begin"/>
+
<para>
If <replaceable>expr1</replaceable> is TRUE
(<literal><replaceable>expr1</replaceable> <>
@@ -1533,13 +1565,9 @@
which it is used.
</para>
- <remark>
- end_description_for_help_topic
- </remark>
+ <remark role="help-description-end"/>
- <remark>
- example_for_help_topic IF
- </remark>
+ <remark role="help-example" condition="IF"/>
<programlisting>
mysql> <userinput>SELECT IF(1>2,2,3);</userinput>
@@ -1625,10 +1653,10 @@
</listitem>
<listitem>
- <remark>
- description_for_help_topic IFNULL
- </remark>
+ <remark role="help-topic" condition="IFNULL"/>
+ <remark role="help-syntax-begin"/>
+
<para>
<indexterm>
<primary><literal>NULL</literal></primary>
@@ -1642,6 +1670,10 @@
<literal>IFNULL(<replaceable>expr1</replaceable>,<replaceable>expr2</replaceable>)</literal>
</para>
+ <remark role="help-syntax-end"/>
+
+ <remark role="help-description-begin"/>
+
<para>
If <replaceable>expr1</replaceable> is not
<literal>NULL</literal>, <literal>IFNULL()</literal>
returns
@@ -1651,13 +1683,9 @@
which it is used.
</para>
- <remark>
- end_description_for_help_topic
- </remark>
+ <remark role="help-description-end"/>
- <remark>
- example_for_help_topic IFNULL
- </remark>
+ <remark role="help-example" condition="IFNULL"/>
<programlisting>
mysql> <userinput>SELECT IFNULL(1,0);</userinput>
@@ -1693,10 +1721,10 @@
</listitem>
<listitem>
- <remark>
- description_for_help_topic NULLIF
- </remark>
+ <remark role="help-topic" condition="NULLIF"/>
+ <remark role="help-syntax-begin"/>
+
<para>
<indexterm type="function">
<primary>NULLIF()</primary>
@@ -1705,6 +1733,10 @@
<literal>NULLIF(<replaceable>expr1</replaceable>,<replaceable>expr2</replaceable>)</literal>
</para>
+ <remark role="help-syntax-end"/>
+
+ <remark role="help-description-begin"/>
+
<para>
Returns <literal>NULL</literal> if
<literal><replaceable>expr1</replaceable> =
@@ -1715,13 +1747,9 @@
<replaceable>expr1</replaceable> END</literal>.
</para>
- <remark>
- end_description_for_help_topic
- </remark>
+ <remark role="help-description-end"/>
- <remark>
- example_for_help_topic NULLIF
- </remark>
+ <remark role="help-example" condition="NULLIF"/>
<programlisting>
mysql> <userinput>SELECT NULLIF(1,1);</userinput>
@@ -1761,9 +1789,7 @@
<secondary>string</secondary>
</indexterm>
- <remark>
- help_category String Functions@Functions
- </remark>
+ <remark role="help-category" condition="String Functions@Functions"/>
<para>
String-valued functions return <literal>NULL</literal> if the
@@ -1780,10 +1806,10 @@
<itemizedlist>
<listitem>
- <remark>
- description_for_help_topic ASCII
- </remark>
+ <remark role="help-topic" condition="ASCII"/>
+ <remark role="help-syntax-begin"/>
+
<para>
<indexterm type="function">
<primary>ASCII()</primary>
@@ -1792,6 +1818,10 @@
<literal>ASCII(<replaceable>str</replaceable>)</literal>
</para>
+ <remark role="help-syntax-end"/>
+
+ <remark role="help-description-begin"/>
+
<para>
Returns the numeric value of the leftmost character of the
string <replaceable>str</replaceable>. Returns
@@ -1802,13 +1832,9 @@
values from <literal>0</literal> to
<literal>255</literal>.
</para>
- <remark>
- end_description_for_help_topic
- </remark>
+ <remark role="help-description-end"/>
- <remark>
- example_for_help_topic ASCII
- </remark>
+ <remark role="help-example" condition="ASCII"/>
<programlisting>
mysql> <userinput>SELECT ASCII('2');</userinput>
@@ -1825,10 +1851,10 @@
</listitem>
<listitem>
- <remark>
- description_for_help_topic BIN
- </remark>
+ <remark role="help-topic" condition="BIN"/>
+ <remark role="help-syntax-begin"/>
+
<para>
<indexterm type="function">
<primary>BIN()</primary>
@@ -1837,6 +1863,10 @@
<literal>BIN(<replaceable>N</replaceable>)</literal>
</para>
+ <remark role="help-syntax-end"/>
+
+ <remark role="help-description-begin"/>
+
<para>
Returns a string representation of the binary value of
<replaceable>N</replaceable>, where
@@ -1847,13 +1877,9 @@
<replaceable>N</replaceable> is
<literal>NULL</literal>.
</para>
- <remark>
- end_description_for_help_topic
- </remark>
+ <remark role="help-description-end"/>
- <remark>
- example_for_help_topic BIN
- </remark>
+ <remark role="help-example" condition="BIN"/>
<programlisting>
mysql> <userinput>SELECT BIN(12);</userinput>
@@ -1862,10 +1888,10 @@
</listitem>
<listitem>
- <remark>
- description_for_help_topic BIT_LENGTH
- </remark>
+ <remark role="help-topic" condition="BIT_LENGTH"/>
+ <remark role="help-syntax-begin"/>
+
<para>
<indexterm type="function">
<primary>BIT_LENGTH()</primary>
@@ -1874,18 +1900,18 @@
<literal>BIT_LENGTH(<replaceable>str</replaceable>)</literal>
</para>
+ <remark role="help-syntax-end"/>
+
+ <remark role="help-description-begin"/>
+
<para>
Returns the length of the string
<replaceable>str</replaceable> in bits.
</para>
- <remark>
- end_description_for_help_topic
- </remark>
+ <remark role="help-description-end"/>
- <remark>
- example_for_help_topic BIT_LENGTH
- </remark>
+ <remark role="help-example" condition="BIT_LENGTH"/>
<programlisting>
mysql> <userinput>SELECT BIT_LENGTH('text');</userinput>
@@ -1898,10 +1924,14 @@
</listitem>
<listitem>
- <remark>
- description_for_help_topic CHAR function
+ <remark role="help-topic" condition="CHAR"/>
+
+ <remark role="help-keywords">
+ function
</remark>
+ <remark role="help-syntax-begin"/>
+
<para>
<indexterm type="function">
<primary>CHAR()</primary>
@@ -1910,6 +1940,10 @@
<literal>CHAR(<replaceable>N</replaceable>,...)</literal>
</para>
+ <remark role="help-syntax-end"/>
+
+ <remark role="help-description-begin"/>
+
<para>
<literal>CHAR()</literal> interprets the arguments as integers
and returns a string consisting of the characters given by the
@@ -1917,13 +1951,9 @@
are skipped.
</para>
- <remark>
- end_description_for_help_topic
- </remark>
+ <remark role="help-description-end"/>
- <remark>
- example_for_help_topic CHAR function
- </remark>
+ <remark role="help-example" condition="CHAR function"/>
<programlisting>
mysql> <userinput>SELECT CHAR(77,121,83,81,'76');</userinput>
@@ -1934,10 +1964,10 @@
</listitem>
<listitem>
- <remark>
- description_for_help_topic CHAR_LENGTH
- </remark>
+ <remark role="help-topic" condition="CHAR_LENGTH"/>
+ <remark role="help-syntax-begin"/>
+
<para>
<indexterm type="function">
<primary>CHAR_LENGTH()</primary>
@@ -1946,6 +1976,10 @@
<literal>CHAR_LENGTH(<replaceable>str</replaceable>)</literal>
</para>
+ <remark role="help-syntax-end"/>
+
+ <remark role="help-description-begin"/>
+
<para>
Returns the length of the string
<replaceable>str</replaceable>, measured in characters. A
@@ -1956,16 +1990,14 @@
<literal>5</literal>.
</para>
- <remark>
- end_description_for_help_topic
- </remark>
+ <remark role="help-description-end"/>
</listitem>
<listitem>
- <remark>
- description_for_help_topic CHARACTER_LENGTH
- </remark>
+ <remark role="help-topic" condition="CHARACTER_LENGTH"/>
+ <remark role="help-syntax-begin"/>
+
<para>
<indexterm type="function">
<primary>CHARACTER_LENGTH()</primary>
@@ -1974,21 +2006,23 @@
<literal>CHARACTER_LENGTH(<replaceable>str</replaceable>)</literal>
</para>
+ <remark role="help-syntax-end"/>
+
+ <remark role="help-description-begin"/>
+
<para>
<literal>CHARACTER_LENGTH()</literal> is a synonym for
<literal>CHAR_LENGTH()</literal>.
</para>
- <remark>
- end_description_for_help_topic
- </remark>
+ <remark role="help-description-end"/>
</listitem>
<listitem>
- <remark>
- description_for_help_topic COMPRESS
- </remark>
+ <remark role="help-topic" condition="COMPRESS"/>
+ <remark role="help-syntax-begin"/>
+
<para>
<indexterm type="function">
<primary>COMPRESS()</primary>
@@ -1997,6 +2031,10 @@
<literal>COMPRESS(<replaceable>string_to_compress</replaceable>)</literal>
</para>
+ <remark role="help-syntax-end"/>
+
+ <remark role="help-description-begin"/>
+
<para>
Compresses a string. This function requires MySQL to have been
compiled with a compression library such as
@@ -2005,13 +2043,9 @@
uncompressed with <literal>UNCOMPRESS()</literal>.
</para>
- <remark>
- end_description_for_help_topic
- </remark>
+ <remark role="help-description-end"/>
- <remark>
- example_for_help_topic COMPRESS
- </remark>
+ <remark role="help-example" condition="COMPRESS"/>
<programlisting>
mysql> <userinput>SELECT
LENGTH(COMPRESS(REPEAT('a',1000)));</userinput>
@@ -2059,10 +2093,10 @@
</listitem>
<listitem>
- <remark>
- description_for_help_topic CONCAT
- </remark>
+ <remark role="help-topic" condition="CONCAT"/>
+ <remark role="help-syntax-begin"/>
+
<para>
<indexterm type="function">
<primary>CONCAT()</primary>
@@ -2071,6 +2105,10 @@
<literal>CONCAT(<replaceable>str1</replaceable>,<replaceable>str2</replaceable>,...)</literal>
</para>
+ <remark role="help-syntax-end"/>
+
+ <remark role="help-description-begin"/>
+
<para>
Returns the string that results from concatenating the
arguments. Returns <literal>NULL</literal> if any argument is
@@ -2084,13 +2122,9 @@
char_col)</literal>
</para>
- <remark>
- end_description_for_help_topic
- </remark>
+ <remark role="help-description-end"/>
- <remark>
- example_for_help_topic CONCAT
- </remark>
+ <remark role="help-example" condition="CONCAT"/>
<programlisting>
mysql> <userinput>SELECT CONCAT('My', 'S', 'QL');</userinput>
@@ -2103,10 +2137,10 @@
</listitem>
<listitem>
- <remark>
- description_for_help_topic CONCAT_WS
- </remark>
+ <remark role="help-topic" condition="CONCAT_WS"/>
+ <remark role="help-syntax-begin"/>
+
<para>
<indexterm type="function">
<primary>CONCAT_WS()</primary>
@@ -2115,6 +2149,10 @@
<literal>CONCAT_WS(<replaceable>separator</replaceable>,<replaceable>str1</replaceable>,<replaceable>str2</replaceable>,...)</literal>
</para>
+ <remark role="help-syntax-end"/>
+
+ <remark role="help-description-begin"/>
+
<para>
<literal>CONCAT_WS()</literal> stands for CONCAT With
Separator and is a special form of
@@ -2127,13 +2165,9 @@
<literal>NULL</literal> values after the separator argument.
</para>
- <remark>
- end_description_for_help_topic
- </remark>
+ <remark role="help-description-end"/>
- <remark>
- example_for_help_topic CONCAT_WS
- </remark>
+ <remark role="help-example" condition="CONCAT_WS"/>
<programlisting>
mysql> <userinput>SELECT CONCAT_WS(',','First name','Second name','Last
Name');</userinput>
@@ -2149,10 +2183,10 @@
</listitem>
<listitem>
- <remark>
- description_for_help_topic CONV
- </remark>
+ <remark role="help-topic" condition="CONV"/>
+ <remark role="help-syntax-begin"/>
+
<para>
<indexterm type="function">
<primary>CONV()</primary>
@@ -2161,6 +2195,10 @@
<literal>CONV(<replaceable>N</replaceable>,<replaceable>from_base</replaceable>,<replaceable>to_base</replaceable>)</literal>
</para>
+ <remark role="help-syntax-end"/>
+
+ <remark role="help-description-begin"/>
+
<para>
Converts numbers between different number bases. Returns a
string representation of the number
@@ -2179,13 +2217,9 @@
64-bit precision.
</para>
- <remark>
- end_description_for_help_topic
- </remark>
+ <remark role="help-description-end"/>
- <remark>
- example_for_help_topic CONV
- </remark>
+ <remark role="help-example" condition="CONV"/>
<programlisting>
mysql> <userinput>SELECT CONV('a',16,2);</userinput>
@@ -2200,10 +2234,10 @@
</listitem>
<listitem>
- <remark>
- description_for_help_topic ELT
- </remark>
+ <remark role="help-topic" condition="ELT"/>
+ <remark role="help-syntax-begin"/>
+
<para>
<indexterm type="function">
<primary>ELT()</primary>
@@ -2212,6 +2246,10 @@
<literal>ELT(<replaceable>N</replaceable>,<replaceable>str1</replaceable>,<replaceable>str2</replaceable>,<replaceable>str3</replaceable>,...)</literal>
</para>
+ <remark role="help-syntax-end"/>
+
+ <remark role="help-description-begin"/>
+
<para>
Returns <replaceable>str1</replaceable> if
<replaceable>N</replaceable> = <literal>1</literal>,
@@ -2224,13 +2262,9 @@
<literal>FIELD()</literal>.
</para>
- <remark>
- end_description_for_help_topic
- </remark>
+ <remark role="help-description-end"/>
- <remark>
- example_for_help_topic ELT
- </remark>
+ <remark role="help-example" condition="ELT"/>
<programlisting>
mysql> <userinput>SELECT ELT(1, 'ej', 'Heja', 'hej',
'foo');</userinput>
@@ -2241,10 +2275,10 @@
</listitem>
<listitem>
- <remark>
- description_for_help_topic EXPORT_SET
- </remark>
+ <remark role="help-topic" condition="EXPORT_SET"/>
+ <remark role="help-syntax-begin"/>
+
<para>
<indexterm type="function">
<primary>EXPORT_SET()</primary>
@@ -2253,6 +2287,10 @@
<literal>EXPORT_SET(<replaceable>bits</replaceable>,<replaceable>on</replaceable>,<replaceable>off</replaceable>[,<replaceable>separator</replaceable>[,<replaceable>number_of_bits</replaceable>]])</literal>
</para>
+ <remark role="help-syntax-end"/>
+
+ <remark role="help-description-begin"/>
+
<para>
Returns a string in which for every bit set in the value
<replaceable>bits</replaceable>, you get an
@@ -2267,13 +2305,9 @@
(default 64).
</para>
- <remark>
- end_description_for_help_topic
- </remark>
+ <remark role="help-description-end"/>
- <remark>
- example_for_help_topic EXPORT_SET
- </remark>
+ <remark role="help-example" condition="EXPORT_SET"/>
<programlisting>
mysql> <userinput>SELECT EXPORT_SET(5,'Y','N',',',4);</userinput>
@@ -2284,10 +2318,10 @@
</listitem>
<listitem>
- <remark>
- description_for_help_topic FIELD
- </remark>
+ <remark role="help-topic" condition="FIELD"/>
+ <remark role="help-syntax-begin"/>
+
<para>
<indexterm type="function">
<primary>FIELD()</primary>
@@ -2296,6 +2330,10 @@
<literal>FIELD(<replaceable>str</replaceable>,<replaceable>str1</replaceable>,<replaceable>str2</replaceable>,<replaceable>str3</replaceable>,...)</literal>
</para>
+ <remark role="help-syntax-end"/>
+
+ <remark role="help-description-begin"/>
+
<para>
Returns the index of <replaceable>str</replaceable> in the
<replaceable>str1</replaceable>,
@@ -2320,13 +2358,9 @@
<literal>ELT()</literal>.
</para>
- <remark>
- end_description_for_help_topic
- </remark>
+ <remark role="help-description-end"/>
- <remark>
- example_for_help_topic FIELD
- </remark>
+ <remark role="help-example" condition="FIELD"/>
<programlisting>
mysql> <userinput>SELECT FIELD('ej', 'Hej', 'ej', 'Heja', 'hej',
'foo');</userinput>
@@ -2337,10 +2371,10 @@
</listitem>
<listitem>
- <remark>
- description_for_help_topic FIND_IN_SET
- </remark>
+ <remark role="help-topic" condition="FIND_IN_SET"/>
+ <remark role="help-syntax-begin"/>
+
<para>
<indexterm type="function">
<primary>FIND_IN_SET()</primary>
@@ -2349,6 +2383,10 @@
<literal>FIND_IN_SET(<replaceable>str</replaceable>,<replaceable>strlist</replaceable>)</literal>
</para>
+ <remark role="help-syntax-end"/>
+
+ <remark role="help-description-begin"/>
+
<para>
Returns a value <literal>1</literal> to
<replaceable>N</replaceable> if the string
@@ -2370,13 +2408,9 @@
(‘<literal>,</literal>’) character.
</para>
- <remark>
- end_description_for_help_topic
- </remark>
+ <remark role="help-description-end"/>
- <remark>
- example_for_help_topic FIND_IN_SET
- </remark>
+ <remark role="help-example" condition="FIND_IN_SET"/>
<programlisting>
mysql> <userinput>SELECT FIND_IN_SET('b','a,b,c,d');</userinput>
@@ -2399,10 +2433,10 @@
</listitem>
<listitem>
- <remark>
- description_for_help_topic HEX
- </remark>
+ <remark role="help-topic" condition="HEX"/>
+ <remark role="help-syntax-begin"/>
+
<para>
<indexterm type="function">
<primary>HEX()</primary>
@@ -2411,6 +2445,10 @@
<literal>HEX(<replaceable>N_or_S</replaceable>)</literal>
</para>
+ <remark role="help-syntax-end"/>
+
+ <remark role="help-description-begin"/>
+
<para>
If <replaceable>N_OR_S</replaceable> is a number, returns a
string representation of the hexadecimal value of
@@ -2428,13 +2466,9 @@
hexadecimal digits.
</para>
- <remark>
- end_description_for_help_topic
- </remark>
+ <remark role="help-description-end"/>
- <remark>
- example_for_help_topic HEX
- </remark>
+ <remark role="help-example" condition="HEX"/>
<programlisting>
mysql> <userinput>SELECT HEX(255);</userinput>
@@ -2447,10 +2481,10 @@
</listitem>
<listitem>
- <remark>
- description_for_help_topic INSERT
- </remark>
+ <remark role="help-topic" condition="INSERT"/>
+ <remark role="help-syntax-begin"/>
+
<para>
<indexterm type="function">
<primary>INSERT()</primary>
@@ -2459,6 +2493,10 @@
<literal>INSERT(<replaceable>str</replaceable>,<replaceable>pos</replaceable>,<replaceable>len</replaceable>,<replaceable>newstr</replaceable>)</literal>
</para>
+ <remark role="help-syntax-end"/>
+
+ <remark role="help-description-begin"/>
+
<para>
Returns the string <replaceable>str</replaceable>, with the
substring beginning at position <replaceable>pos</replaceable>
@@ -2472,13 +2510,9 @@
argument is null.
</para>
- <remark>
- end_description_for_help_topic
- </remark>
+ <remark role="help-description-end"/>
- <remark>
- example_for_help_topic INSERT
- </remark>
+ <remark role="help-example" condition="INSERT"/>
<programlisting>
mysql> <userinput>SELECT INSERT('Quadratic', 3, 4,
'What');</userinput>
@@ -2495,10 +2529,10 @@
</listitem>
<listitem>
- <remark>
- description_for_help_topic INSTR
- </remark>
+ <remark role="help-topic" condition="INSTR"/>
+ <remark role="help-syntax-begin"/>
+
<para>
<indexterm type="function">
<primary>INSTR()</primary>
@@ -2507,6 +2541,10 @@
<literal>INSTR(<replaceable>str</replaceable>,<replaceable>substr</replaceable>)</literal>
</para>
+ <remark role="help-syntax-end"/>
+
+ <remark role="help-description-begin"/>
+
<para>
Returns the position of the first occurrence of substring
<replaceable>substr</replaceable> in string
@@ -2515,13 +2553,9 @@
the arguments are swapped.
</para>
- <remark>
- end_description_for_help_topic
- </remark>
+ <remark role="help-description-end"/>
- <remark>
- example_for_help_topic INSTR
- </remark>
+ <remark role="help-example" condition="INSTR"/>
<programlisting>
mysql> <userinput>SELECT INSTR('foobarbar', 'bar');</userinput>
@@ -2538,10 +2572,10 @@
</listitem>
<listitem>
- <remark>
- description_for_help_topic LCASE
- </remark>
+ <remark role="help-topic" condition="LCASE"/>
+ <remark role="help-syntax-begin"/>
+
<para>
<indexterm type="function">
<primary>LCASE()</primary>
@@ -2550,21 +2584,23 @@
<literal>LCASE(<replaceable>str</replaceable>)</literal>
</para>
+ <remark role="help-syntax-end"/>
+
+ <remark role="help-description-begin"/>
+
<para>
<literal>LCASE()</literal> is a synonym for
<literal>LOWER()</literal>.
</para>
- <remark>
- end_description_for_help_topic
- </remark>
+ <remark role="help-description-end"/>
</listitem>
<listitem>
- <remark>
- description_for_help_topic LEFT
- </remark>
+ <remark role="help-topic" condition="LEFT"/>
+ <remark role="help-syntax-begin"/>
+
<para>
<indexterm type="function">
<primary>LEFT()</primary>
@@ -2573,18 +2609,18 @@
<literal>LEFT(<replaceable>str</replaceable>,<replaceable>len</replaceable>)</literal>
</para>
+ <remark role="help-syntax-end"/>
+
+ <remark role="help-description-begin"/>
+
<para>
Returns the leftmost <replaceable>len</replaceable> characters
from the string <replaceable>str</replaceable>.
</para>
- <remark>
- end_description_for_help_topic
- </remark>
+ <remark role="help-description-end"/>
- <remark>
- example_for_help_topic LEFT
- </remark>
+ <remark role="help-example" condition="LEFT"/>
<programlisting>
mysql> <userinput>SELECT LEFT('foobarbar', 5);</userinput>
@@ -2593,10 +2629,10 @@
</listitem>
<listitem>
- <remark>
- description_for_help_topic LENGTH
- </remark>
+ <remark role="help-topic" condition="LENGTH"/>
+ <remark role="help-syntax-begin"/>
+
<para>
<indexterm type="function">
<primary>LENGTH()</primary>
@@ -2605,6 +2641,10 @@
<literal>LENGTH(<replaceable>str</replaceable>)</literal>
</para>
+ <remark role="help-syntax-end"/>
+
+ <remark role="help-description-begin"/>
+
<para>
Returns the length of the string
<replaceable>str</replaceable>, measured in bytes. A
@@ -2615,13 +2655,9 @@
<literal>5</literal>.
</para>
- <remark>
- end_description_for_help_topic
- </remark>
+ <remark role="help-description-end"/>
- <remark>
- example_for_help_topic LENGTH
- </remark>
+ <remark role="help-example" condition="LENGTH"/>
<programlisting>
mysql> <userinput>SELECT LENGTH('text');</userinput>
@@ -2630,10 +2666,10 @@
</listitem>
<listitem>
- <remark>
- description_for_help_topic LOAD_FILE
- </remark>
+ <remark role="help-topic" condition="LOAD_FILE"/>
+ <remark role="help-syntax-begin"/>
+
<para>
<indexterm type="function">
<primary>FILE</primary>
@@ -2646,6 +2682,10 @@
<literal>LOAD_FILE(<replaceable>file_name</replaceable>)</literal>
</para>
+ <remark role="help-syntax-end"/>
+
+ <remark role="help-description-begin"/>
+
<para>
Reads the file and returns the file contents as a string. The
file must be located on the server, you must specify the full
@@ -2661,13 +2701,9 @@
returns <literal>NULL</literal>.
</para>
- <remark>
- end_description_for_help_topic
- </remark>
+ <remark role="help-description-end"/>
- <remark>
- example_for_help_topic LOAD_FILE
- </remark>
+ <remark role="help-example" condition="LOAD_FILE"/>
<programlisting>
mysql> <userinput>UPDATE
<replaceable>tbl_name</replaceable></userinput>
@@ -2686,10 +2722,10 @@
</listitem>
<listitem>
- <remark>
- description_for_help_topic LOCATE
- </remark>
+ <remark role="help-topic" condition="LOCATE"/>
+ <remark role="help-syntax-begin"/>
+
<para>
<indexterm type="function">
<primary>LOCATE()</primary>
@@ -2700,6 +2736,10 @@
<literal>LOCATE(<replaceable>substr</replaceable>,<replaceable>str</replaceable>,<replaceable>pos</replaceable>)</literal>
</para>
+ <remark role="help-syntax-end"/>
+
+ <remark role="help-description-begin"/>
+
<para>
The first syntax returns the position of the first occurrence
of substring <replaceable>substr</replaceable> in string
@@ -2712,13 +2752,9 @@
<replaceable>str</replaceable>.
</para>
- <remark>
- end_description_for_help_topic
- </remark>
+ <remark role="help-description-end"/>
- <remark>
- example_for_help_topic POSITION
- </remark>
+ <remark role="help-example" condition="POSITION"/>
<programlisting>
mysql> <userinput>SELECT LOCATE('bar', 'foobarbar');</userinput>
@@ -2737,10 +2773,10 @@
</listitem>
<listitem>
- <remark>
- description_for_help_topic LOWER
- </remark>
+ <remark role="help-topic" condition="LOWER"/>
+ <remark role="help-syntax-begin"/>
+
<para>
<indexterm type="function">
<primary>LOWER()</primary>
@@ -2749,19 +2785,19 @@
<literal>LOWER(<replaceable>str</replaceable>)</literal>
</para>
+ <remark role="help-syntax-end"/>
+
+ <remark role="help-description-begin"/>
+
<para>
Returns the string <replaceable>str</replaceable> with all
characters changed to lowercase according to the current
character set mapping (the default is cp1252 Latin1).
</para>
- <remark>
- end_description_for_help_topic
- </remark>
+ <remark role="help-description-end"/>
- <remark>
- example_for_help_topic LOWER
- </remark>
+ <remark role="help-example" condition="LOWER"/>
<programlisting>
mysql> <userinput>SELECT LOWER('QUADRATICALLY');</userinput>
@@ -2774,10 +2810,10 @@
</listitem>
<listitem>
- <remark>
- description_for_help_topic LPAD
- </remark>
+ <remark role="help-topic" condition="LPAD"/>
+ <remark role="help-syntax-begin"/>
+
<para>
<indexterm type="function">
<primary>LPAD()</primary>
@@ -2795,14 +2831,14 @@
to <replaceable>len</replaceable> characters.
</para>
- <remark>
- end_description_for_help_topic
- </remark>
+ <remark role="help-syntax-end"/>
- <remark>
- example_for_help_topic LPAD
- </remark>
+ <remark role="help-description-begin"/>
+ <remark role="help-description-end"/>
+
+ <remark role="help-example" condition="LPAD"/>
+
<programlisting>
mysql> <userinput>SELECT LPAD('hi',4,'??');</userinput>
-> '??hi'
@@ -2812,10 +2848,10 @@
</listitem>
<listitem>
- <remark>
- description_for_help_topic LTRIM
- </remark>
+ <remark role="help-topic" condition="LTRIM"/>
+ <remark role="help-syntax-begin"/>
+
<para>
<indexterm type="function">
<primary>LTRIM()</primary>
@@ -2824,18 +2860,18 @@
<literal>LTRIM(<replaceable>str</replaceable>)</literal>
</para>
+ <remark role="help-syntax-end"/>
+
+ <remark role="help-description-begin"/>
+
<para>
Returns the string <replaceable>str</replaceable> with leading
space characters removed.
</para>
- <remark>
- end_description_for_help_topic
- </remark>
+ <remark role="help-description-end"/>
- <remark>
- example_for_help_topic LTRIM
- </remark>
+ <remark role="help-example" condition="LTRIM"/>
<programlisting>
mysql> <userinput>SELECT LTRIM(' barbar');</userinput>
@@ -2848,10 +2884,10 @@
</listitem>
<listitem>
- <remark>
- description_for_help_topic MAKE_SET
- </remark>
+ <remark role="help-topic" condition="MAKE_SET"/>
+ <remark role="help-syntax-begin"/>
+
<para>
<indexterm type="function">
<primary>MAKE_SET()</primary>
@@ -2860,6 +2896,10 @@
<literal>MAKE_SET(<replaceable>bits</replaceable>,<replaceable>str1</replaceable>,<replaceable>str2</replaceable>,...)</literal>
</para>
+ <remark role="help-syntax-end"/>
+
+ <remark role="help-description-begin"/>
+
<para>
Returns a set value (a string containing substrings separated
by ‘<literal>,</literal>’ characters)
consisting
@@ -2873,13 +2913,9 @@
not appended to the result.
</para>
- <remark>
- end_description_for_help_topic
- </remark>
+ <remark role="help-description-end"/>
- <remark>
- example_for_help_topic MAKE_SET
- </remark>
+ <remark role="help-example" condition="MAKE_SET"/>
<programlisting>
mysql> <userinput>SELECT MAKE_SET(1,'a','b','c');</userinput>
@@ -2894,10 +2930,10 @@
</listitem>
<listitem>
- <remark>
- description_for_help_topic MID
- </remark>
+ <remark role="help-topic" condition="MID"/>
+ <remark role="help-syntax-begin"/>
+
<para>
<indexterm type="function">
<primary>MID()</primary>
@@ -2906,22 +2942,24 @@
<literal>MID(<replaceable>str</replaceable>,<replaceable>pos</replaceable>,<replaceable>len</replaceable>)</literal>
</para>
+ <remark role="help-syntax-end"/>
+
+ <remark role="help-description-begin"/>
+
<para>
<literal>MID(<replaceable>str</replaceable>,<replaceable>pos</replaceable>,<replaceable>len</replaceable>)</literal>
is a synonym for
<literal>SUBSTRING(<replaceable>str</replaceable>,<replaceable>pos</replaceable>,<replaceable>len</replaceable>)</literal>.
</para>
- <remark>
- end_description_for_help_topic
- </remark>
+ <remark role="help-description-end"/>
</listitem>
<listitem>
- <remark>
- description_for_help_topic OCT
- </remark>
+ <remark role="help-topic" condition="OCT"/>
+ <remark role="help-syntax-begin"/>
+
<para>
<indexterm type="function">
<primary>OCT()</primary>
@@ -2930,6 +2968,10 @@
<literal>OCT(<replaceable>N</replaceable>)</literal>
</para>
+ <remark role="help-syntax-end"/>
+
+ <remark role="help-description-begin"/>
+
<para>
Returns a string representation of the octal value of
<replaceable>N</replaceable>, where
@@ -2940,13 +2982,9 @@
<literal>NULL</literal>.
</para>
- <remark>
- end_description_for_help_topic
- </remark>
+ <remark role="help-description-end"/>
- <remark>
- example_for_help_topic OCT
- </remark>
+ <remark role="help-example" condition="OCT"/>
<programlisting>
mysql> <userinput>SELECT OCT(12);</userinput>
@@ -2955,10 +2993,10 @@
</listitem>
<listitem>
- <remark>
- description_for_help_topic OCTETLENGTH
- </remark>
+ <remark role="help-topic" condition="OCTETLENGTH"/>
+ <remark role="help-syntax-begin"/>
+
<para>
<indexterm type="function">
<primary>OCTET_LENGTH()</primary>
@@ -2967,21 +3005,23 @@
<literal>OCTET_LENGTH(<replaceable>str</replaceable>)</literal>
</para>
+ <remark role="help-syntax-end"/>
+
+ <remark role="help-description-begin"/>
+
<para>
<literal>OCTET_LENGTH()</literal> is a synonym for
<literal>LENGTH()</literal>.
</para>
- <remark>
- end_description_for_help_topic
- </remark>
+ <remark role="help-description-end"/>
</listitem>
<listitem>
- <remark>
- description_for_help_topic ORD
- </remark>
+ <remark role="help-topic" condition="ORD"/>
+ <remark role="help-syntax-begin"/>
+
<para>
<indexterm type="function">
<primary>ORD()</primary>
@@ -2990,6 +3030,10 @@
<literal>ORD(<replaceable>str</replaceable>)</literal>
</para>
+ <remark role="help-syntax-end"/>
+
+ <remark role="help-description-begin"/>
+
<para>
If the leftmost character of the string
<replaceable>str</replaceable> is a multi-byte character,
@@ -3009,13 +3053,9 @@
<literal>ASCII()</literal> function.
</para>
- <remark>
- end_description_for_help_topic
- </remark>
+ <remark role="help-description-end"/>
- <remark>
- example_for_help_topic ORD
- </remark>
+ <remark role="help-example" condition="ORD"/>
<programlisting>
mysql> <userinput>SELECT ORD('2');</userinput>
@@ -3024,10 +3064,10 @@
</listitem>
<listitem>
- <remark>
- description_for_help_topic POSITION
- </remark>
+ <remark role="help-topic" condition="POSITION"/>
+ <remark role="help-syntax-begin"/>
+
<para>
<indexterm type="function">
<primary>POSITION()</primary>
@@ -3037,22 +3077,24 @@
<replaceable>str</replaceable>)</literal>
</para>
+ <remark role="help-syntax-end"/>
+
+ <remark role="help-description-begin"/>
+
<para>
<literal>POSITION(<replaceable>substr</replaceable> IN
<replaceable>str</replaceable>)</literal> is a synonym for
<literal>LOCATE(<replaceable>substr</replaceable>,<replaceable>str</replaceable>)</literal>.
</para>
- <remark>
- end_description_for_help_topic
- </remark>
+ <remark role="help-description-end"/>
</listitem>
<listitem>
- <remark>
- description_for_help_topic QUOTE
- </remark>
+ <remark role="help-topic" condition="QUOTE"/>
+ <remark role="help-syntax-begin"/>
+
<para>
<indexterm type="function">
<primary>QUOTE()</primary>
@@ -3061,6 +3103,10 @@
<literal>QUOTE(<replaceable>str</replaceable>)</literal>
</para>
+ <remark role="help-syntax-end"/>
+
+ <remark role="help-description-begin"/>
+
<para>
Quotes a string to produce a result that can be used as a
properly escaped data value in an SQL statement. The string is
@@ -3074,13 +3120,9 @@
MySQL 4.0.3.
</para>
- <remark>
- end_description_for_help_topic
- </remark>
+ <remark role="help-description-end"/>
- <remark>
- example_for_help_topic QUOTE
- </remark>
+ <remark role="help-example" condition="QUOTE"/>
<programlisting>
mysql> <userinput>SELECT QUOTE('Don\'t!');</userinput>
@@ -3091,10 +3133,10 @@
</listitem>
<listitem>
- <remark>
- description_for_help_topic REPEAT
- </remark>
+ <remark role="help-topic" condition="REPEAT"/>
+ <remark role="help-syntax-begin"/>
+
<para>
<indexterm type="function">
<primary>REPEAT()</primary>
@@ -3103,6 +3145,10 @@
<literal>REPEAT(<replaceable>str</replaceable>,<replaceable>count</replaceable>)</literal>
</para>
+ <remark role="help-syntax-end"/>
+
+ <remark role="help-description-begin"/>
+
<para>
Returns a string consisting of the string
<replaceable>str</replaceable> repeated
@@ -3113,13 +3159,9 @@
<replaceable>count</replaceable> are
<literal>NULL</literal>.
</para>
- <remark>
- end_description_for_help_topic
- </remark>
+ <remark role="help-description-end"/>
- <remark>
- example_for_help_topic REPEAT
- </remark>
+ <remark role="help-example" condition="REPEAT"/>
<programlisting>
mysql> <userinput>SELECT REPEAT('MySQL', 3);</userinput>
@@ -3128,10 +3170,10 @@
</listitem>
<listitem>
- <remark>
- description_for_help_topic REPLACE
- </remark>
+ <remark role="help-topic" condition="REPLACE"/>
+ <remark role="help-syntax-begin"/>
+
<para>
<indexterm type="function">
<primary>REPLACE()</primary>
@@ -3140,19 +3182,19 @@
<literal>REPLACE(<replaceable>str</replaceable>,<replaceable>from_str</replaceable>,<replaceable>to_str</replaceable>)</literal>
</para>
+ <remark role="help-syntax-end"/>
+
+ <remark role="help-description-begin"/>
+
<para>
Returns the string <replaceable>str</replaceable> with all
occurrences of the string <replaceable>from_str</replaceable>
replaced by the string <replaceable>to_str</replaceable>.
</para>
- <remark>
- end_description_for_help_topic
- </remark>
+ <remark role="help-description-end"/>
- <remark>
- example_for_help_topic REPLACE
- </remark>
+ <remark role="help-example" condition="REPLACE"/>
<programlisting>
mysql> <userinput>SELECT REPLACE('www.mysql.com', 'w',
'Ww');</userinput>
@@ -3165,10 +3207,10 @@
</listitem>
<listitem>
- <remark>
- description_for_help_topic REVERSE
- </remark>
+ <remark role="help-topic" condition="REVERSE"/>
+ <remark role="help-syntax-begin"/>
+
<para>
<indexterm type="function">
<primary>REVERSE()</primary>
@@ -3177,18 +3219,18 @@
<literal>REVERSE(<replaceable>str</replaceable>)</literal>
</para>
+ <remark role="help-syntax-end"/>
+
+ <remark role="help-description-begin"/>
+
<para>
Returns the string <replaceable>str</replaceable> with the
order of the characters reversed.
</para>
- <remark>
- end_description_for_help_topic
- </remark>
+ <remark role="help-description-end"/>
- <remark>
- example_for_help_topic REVERSE
- </remark>
+ <remark role="help-example" condition="REVERSE"/>
<programlisting>
mysql> <userinput>SELECT REVERSE('abc');</userinput>
@@ -3201,10 +3243,10 @@
</listitem>
<listitem>
- <remark>
- description_for_help_topic RIGHT
- </remark>
+ <remark role="help-topic" condition="RIGHT"/>
+ <remark role="help-syntax-begin"/>
+
<para>
<indexterm type="function">
<primary>RIGHT()</primary>
@@ -3213,18 +3255,18 @@
<literal>RIGHT(<replaceable>str</replaceable>,<replaceable>len</replaceable>)</literal>
</para>
+ <remark role="help-syntax-end"/>
+
+ <remark role="help-description-begin"/>
+
<para>
Returns the rightmost <replaceable>len</replaceable>
characters from the string <replaceable>str</replaceable>.
</para>
- <remark>
- end_description_for_help_topic
- </remark>
+ <remark role="help-description-end"/>
- <remark>
- example_for_help_topic RIGHT
- </remark>
+ <remark role="help-example" condition="RIGHT"/>
<programlisting>
mysql> <userinput>SELECT RIGHT('foobarbar', 4);</userinput>
@@ -3237,10 +3279,10 @@
</listitem>
<listitem>
- <remark>
- description_for_help_topic RPAD
- </remark>
+ <remark role="help-topic" condition="RPAD"/>
+ <remark role="help-syntax-begin"/>
+
<para>
<indexterm type="function">
<primary>RPAD()</primary>
@@ -3249,6 +3291,10 @@
<literal>RPAD(<replaceable>str</replaceable>,<replaceable>len</replaceable>,<replaceable>padstr</replaceable>)</literal>
</para>
+ <remark role="help-syntax-end"/>
+
+ <remark role="help-description-begin"/>
+
<para>
Returns the string <replaceable>str</replaceable>,
right-padded with the string <replaceable>padstr</replaceable>
@@ -3258,13 +3304,9 @@
to <replaceable>len</replaceable> characters.
</para>
- <remark>
- end_description_for_help_topic
- </remark>
+ <remark role="help-description-end"/>
- <remark>
- example_for_help_topic RPAD
- </remark>
+ <remark role="help-example" condition="RPAD"/>
<programlisting>
mysql> <userinput>SELECT RPAD('hi',5,'?');</userinput>
@@ -3279,10 +3321,10 @@
</listitem>
<listitem>
- <remark>
- description_for_help_topic RTRIM
- </remark>
+ <remark role="help-topic" condition="RTRIM"/>
+ <remark role="help-syntax-begin"/>
+
<para>
<indexterm type="function">
<primary>RTRIM()</primary>
@@ -3291,18 +3333,18 @@
<literal>RTRIM(<replaceable>str</replaceable>)</literal>
</para>
+ <remark role="help-syntax-end"/>
+
+ <remark role="help-description-begin"/>
+
<para>
Returns the string <replaceable>str</replaceable> with
trailing space characters removed.
</para>
- <remark>
- end_description_for_help_topic
- </remark>
+ <remark role="help-description-end"/>
- <remark>
- example_for_help_topic RTRIM
- </remark>
+ <remark role="help-example" condition="RTRIM"/>
<programlisting>
mysql> <userinput>SELECT RTRIM('barbar ');</userinput>
@@ -3315,10 +3357,10 @@
</listitem>
<listitem>
- <remark>
- description_for_help_topic SOUNDEX
- </remark>
+ <remark role="help-topic" condition="SOUNDEX"/>
+ <remark role="help-syntax-begin"/>
+
<para>
<indexterm type="function">
<primary>SOUNDEX()</primary>
@@ -3327,6 +3369,10 @@
<literal>SOUNDEX(<replaceable>str</replaceable>)</literal>
</para>
+ <remark role="help-syntax-end"/>
+
+ <remark role="help-description-begin"/>
+
<para>
Returns a soundex string from <replaceable>str</replaceable>.
Two strings that sound almost the same should have identical
@@ -3339,13 +3385,9 @@
outside the A-Z range are treated as vowels.
</para>
- <remark>
- end_description_for_help_topic
- </remark>
+ <remark role="help-description-end"/>
- <remark>
- example_for_help_topic SOUNDEX
- </remark>
+ <remark role="help-example" condition="SOUNDEX"/>
<programlisting>
mysql> <userinput>SELECT SOUNDEX('Hello');</userinput>
@@ -3365,10 +3407,14 @@
</listitem>
<listitem>
- <remark>
- description_for_help_topic SOUNDS LIKE SOUNDS LIKE
+ <remark role="help-topic" condition="SOUNDS LIKE"/>
+
+ <remark role="help-keywords">
+ SOUNDS LIKE
</remark>
+ <remark role="help-syntax-begin"/>
+
<para>
<indexterm type="function">
<primary>SOUNDS LIKE</primary>
@@ -3378,6 +3424,10 @@
<replaceable>expr2</replaceable></literal>
</para>
+ <remark role="help-syntax-end"/>
+
+ <remark role="help-description-begin"/>
+
<para>
This is the same as
<literal>SOUNDEX(<replaceable>expr1</replaceable>) =
@@ -3385,16 +3435,14 @@
available beginning with MySQL 4.1.0.
</para>
- <remark>
- end_description_for_help_topic
- </remark>
+ <remark role="help-description-end"/>
</listitem>
<listitem>
- <remark>
- description_for_help_topic SPACE
- </remark>
+ <remark role="help-topic" condition="SPACE"/>
+ <remark role="help-syntax-begin"/>
+
<para>
<indexterm type="function">
<primary>SPACE()</primary>
@@ -3403,18 +3451,18 @@
<literal>SPACE(<replaceable>N</replaceable>)</literal>
</para>
+ <remark role="help-syntax-end"/>
+
+ <remark role="help-description-begin"/>
+
<para>
Returns a string consisting of <replaceable>N</replaceable>
space characters.
</para>
- <remark>
- end_description_for_help_topic
- </remark>
+ <remark role="help-description-end"/>
- <remark>
- example_for_help_topic SPACE
- </remark>
+ <remark role="help-example" condition="SPACE"/>
<programlisting>
mysql> <userinput>SELECT SPACE(6);</userinput>
@@ -3423,10 +3471,10 @@
</listitem>
<listitem>
- <remark>
- description_for_help_topic SUBSTRING
- </remark>
+ <remark role="help-topic" condition="SUBSTRING"/>
+ <remark role="help-syntax-begin"/>
+
<para>
<indexterm type="function">
<primary>SUBSTRING()</primary>
@@ -3438,13 +3486,17 @@
<literal>SUBSTRING(<replaceable>str</replaceable>,<replaceable>pos</replaceable>)</literal>
, <literal>SUBSTRING(<replaceable>str</replaceable> FROM
- <replaceable>pos</replaceable>)</literal>,
+ <replaceable>pos</replaceable>)</literal>
<literal>SUBSTRING(<replaceable>str</replaceable>,<replaceable>pos</replaceable>,<replaceable>len</replaceable>)</literal>
, <literal>SUBSTRING(<replaceable>str</replaceable> FROM
<replaceable>pos</replaceable> FOR
<replaceable>len</replaceable>)</literal>
</para>
+ <remark role="help-syntax-end"/>
+
+ <remark role="help-description-begin"/>
+
<para>
The forms without a <replaceable>len</replaceable> argument
return a substring from string <replaceable>str</replaceable>
@@ -3462,13 +3514,9 @@
in any of the forms of this function.
</para>
- <remark>
- end_description_for_help_topic
- </remark>
+ <remark role="help-description-end"/>
- <remark>
- example_for_help_topic SUBSTRING
- </remark>
+ <remark role="help-example" condition="SUBSTRING"/>
<programlisting>
mysql> <userinput>SELECT SUBSTRING('Quadratically',5);</userinput>
@@ -3502,10 +3550,10 @@
</listitem>
<listitem>
- <remark>
- description_for_help_topic SUBSTRING_INDEX
- </remark>
+ <remark role="help-topic" condition="SUBSTRING_INDEX"/>
+ <remark role="help-syntax-begin"/>
+
<para>
<indexterm type="function">
<primary>SUBSTRING_INDEX()</primary>
@@ -3514,6 +3562,10 @@
<literal>SUBSTRING_INDEX(<replaceable>str</replaceable>,<replaceable>delim</replaceable>,<replaceable>count</replaceable>)</literal>
</para>
+ <remark role="help-syntax-end"/>
+
+ <remark role="help-description-begin"/>
+
<para>
Returns the substring from string
<replaceable>str</replaceable> before
@@ -3526,13 +3578,9 @@
the right) is returned.
</para>
- <remark>
- end_description_for_help_topic
- </remark>
+ <remark role="help-description-end"/>
- <remark>
- example_for_help_topic SUBSTRING_INDEX
- </remark>
+ <remark role="help-example" condition="SUBSTRING_INDEX"/>
<programlisting>
mysql> <userinput>SELECT SUBSTRING_INDEX('www.mysql.com', '.',
2);</userinput>
@@ -3547,10 +3595,14 @@
</listitem>
<listitem>
- <remark>
- description_for_help_topic TRIM BOTH LEADING TRAILING FROM
+ <remark role="help-topic" condition="TRIM"/>
+
+ <remark role="help-keywords">
+ BOTH LEADING TRAILING FROM
</remark>
+ <remark role="help-syntax-begin"/>
+
<para>
<indexterm type="function">
<primary>TRIM()</primary>
@@ -3558,11 +3610,15 @@
<literal>TRIM([{BOTH | LEADING | TRAILING}
[<replaceable>remstr</replaceable>] FROM]
- <replaceable>str</replaceable>)</literal>,
+ <replaceable>str</replaceable>)</literal>
<literal>TRIM(<replaceable>remstr</replaceable> FROM]
<replaceable>str</replaceable>)</literal>
</para>
+ <remark role="help-syntax-end"/>
+
+ <remark role="help-description-begin"/>
+
<para>
Returns the string <replaceable>str</replaceable> with all
<replaceable>remstr</replaceable> prefixes and/or suffixes
@@ -3573,13 +3629,9 @@
specified, spaces are removed.
</para>
- <remark>
- end_description_for_help_topic
- </remark>
+ <remark role="help-description-end"/>
- <remark>
- example_for_help_topic TRIM
- </remark>
+ <remark role="help-example" condition="TRIM"/>
<programlisting>
mysql> <userinput>SELECT TRIM(' bar ');</userinput>
@@ -3598,10 +3650,10 @@
</listitem>
<listitem>
- <remark>
- description_for_help_topic UCASE
- </remark>
+ <remark role="help-topic" condition="UCASE"/>
+ <remark role="help-syntax-begin"/>
+
<para>
<indexterm type="function">
<primary>UCASE()</primary>
@@ -3610,21 +3662,23 @@
<literal>UCASE(<replaceable>str</replaceable>)</literal>
</para>
+ <remark role="help-syntax-end"/>
+
+ <remark role="help-description-begin"/>
+
<para>
<literal>UCASE()</literal> is a synonym for
<literal>UPPER()</literal>.
</para>
- <remark>
- end_description_for_help_topic
- </remark>
+ <remark role="help-description-end"/>
</listitem>
<listitem>
- <remark>
- description_for_help_topic UNCOMPRESS
- </remark>
+ <remark role="help-topic" condition="UNCOMPRESS"/>
+ <remark role="help-syntax-begin"/>
+
<para>
<indexterm type="function">
<primary>UNCOMPRESS()</primary>
@@ -3633,6 +3687,10 @@
<literal>UNCOMPRESS(<replaceable>string_to_uncompress</replaceable>)</literal>
</para>
+ <remark role="help-syntax-end"/>
+
+ <remark role="help-description-begin"/>
+
<para>
Uncompresses a string compressed by the
<literal>COMPRESS()</literal> function. If the argument is not
@@ -3642,13 +3700,9 @@
Otherwise, the return value is always <literal>NULL</literal>.
</para>
- <remark>
- end_description_for_help_topic
- </remark>
+ <remark role="help-description-end"/>
- <remark>
- example_for_help_topic UNCOMPRESS
- </remark>
+ <remark role="help-example" condition="UNCOMPRESS"/>
<programlisting>
mysql> <userinput>SELECT UNCOMPRESS(COMPRESS('any
string'));</userinput>
@@ -3663,10 +3717,10 @@
</listitem>
<listitem>
- <remark>
- description_for_help_topic UNCOMPRESSED_LENGTH
- </remark>
+ <remark role="help-topic" condition="UNCOMPRESSED_LENGTH"/>
+ <remark role="help-syntax-begin"/>
+
<para>
<indexterm type="function">
<primary>UNCOMPRESSED_LENGTH()</primary>
@@ -3675,17 +3729,17 @@
<literal>UNCOMPRESSED_LENGTH(<replaceable>compressed_string</replaceable>)</literal>
</para>
+ <remark role="help-syntax-end"/>
+
+ <remark role="help-description-begin"/>
+
<para>
Returns the length of a compressed string before compression.
</para>
- <remark>
- end_description_for_help_topic
- </remark>
+ <remark role="help-description-end"/>
- <remark>
- example_for_help_topic UNCOMPRESSED_LENGTH
- </remark>
+ <remark role="help-example" condition="UNCOMPRESSED_LENGTH"/>
<programlisting>
mysql> <userinput>SELECT
UNCOMPRESSED_LENGTH(COMPRESS(REPEAT('a',30)));</userinput>
@@ -3699,10 +3753,10 @@
</listitem>
<listitem>
- <remark>
- description_for_help_topic UNHEX
- </remark>
+ <remark role="help-topic" condition="UNHEX"/>
+ <remark role="help-syntax-begin"/>
+
<para>
<indexterm type="function">
<primary>UNHEX()</primary>
@@ -3711,6 +3765,10 @@
<literal>UNHEX(<replaceable>str</replaceable>)</literal>
</para>
+ <remark role="help-syntax-end"/>
+
+ <remark role="help-description-begin"/>
+
<para>
Does the opposite of
<literal>HEX(<replaceable>str</replaceable>)</literal>.
That
@@ -3720,13 +3778,9 @@
returned as a binary string.
</para>
- <remark>
- end_description_for_help_topic
- </remark>
+ <remark role="help-description-end"/>
- <remark>
- example_for_help_topic UNHEX
- </remark>
+ <remark role="help-example" condition="UNHEX"/>
<programlisting>
mysql> <userinput>SELECT UNHEX('4D7953514C');</userinput>
@@ -3745,10 +3799,10 @@
</listitem>
<listitem>
- <remark>
- description_for_help_topic UPPER
- </remark>
+ <remark role="help-topic" condition="UPPER"/>
+ <remark role="help-syntax-begin"/>
+
<para>
<indexterm type="function">
<primary>UPPER()</primary>
@@ -3757,19 +3811,19 @@
<literal>UPPER(<replaceable>str</replaceable>)</literal>
</para>
+ <remark role="help-syntax-end"/>
+
+ <remark role="help-description-begin"/>
+
<para>
Returns the string <replaceable>str</replaceable> with all
characters changed to uppercase according to the current
character set mapping (the default is cp1252 Latin1).
</para>
- <remark>
- end_description_for_help_topic
- </remark>
+ <remark role="help-description-end"/>
- <remark>
- example_for_help_topic UPPER
- </remark>
+ <remark role="help-example" condition="UPPER"/>
<programlisting>
mysql> <userinput>SELECT UPPER('Hej');</userinput>
@@ -3796,6 +3850,8 @@
<secondary>string comparison</secondary>
</indexterm>
+ <remark role="help-category" condition="String Functions@Functions"/>
+
<para>
MySQL automatically converts numbers to strings as necessary,
and vice versa.
@@ -3852,10 +3908,14 @@
<itemizedlist>
<listitem>
- <remark>
- description_for_help_topic LIKE ESCAPE
+ <remark role="help-topic" condition="LIKE"/>
+
+ <remark role="help-keywords">
+ ESCAPE
</remark>
+ <remark role="help-syntax-begin"/>
+
<para>
<indexterm type="function">
<primary>LIKE</primary>
@@ -3866,6 +3926,10 @@
'<replaceable>escape-char</replaceable>']</literal>
</para>
+ <remark role="help-syntax-end"/>
+
+ <remark role="help-description-begin"/>
+
<para>
Pattern matching using SQL simple regular expression
comparison. Returns <literal>1</literal>
@@ -3881,6 +3945,8 @@
can be specified as a string expression or table column.
</para>
+ <remark role="help-description-end"/>
+
<para>
With <literal>LIKE</literal> you can use the following two
wildcard characters in the pattern:
@@ -3907,14 +3973,8 @@
</tgroup>
</informaltable>
- <remark>
- end_description_for_help_topic
- </remark>
+ <remark role="help-example" condition="LIKE"/>
- <remark>
- example_for_help_topic LIKE
- </remark>
-
<programlisting>
mysql> <userinput>SELECT 'David!' LIKE 'David_';</userinput>
-> 1
@@ -4008,10 +4068,10 @@
</listitem>
<listitem>
- <remark>
- description_for_help_topic NOT LIKE
- </remark>
+ <remark role="help-topic" condition="NOT LIKE"/>
+ <remark role="help-syntax-begin"/>
+
<para>
<indexterm type="function">
<primary>NOT LIKE</primary>
@@ -4022,6 +4082,10 @@
'<replaceable>escape-char</replaceable>']</literal>
</para>
+ <remark role="help-syntax-end"/>
+
+ <remark role="help-description-begin"/>
+
<para>
This is the same as <literal>NOT
(<replaceable>expr</replaceable> LIKE
@@ -4029,43 +4093,47 @@
'<replaceable>escape-char</replaceable>'])</literal>.
</para>
- <remark>
- end_description_for_help_topic
- </remark>
+ <remark role="help-description-end"/>
</listitem>
<listitem>
- <remark>
- description_for_help_topic NOT REGEXP
- </remark>
+ <remark role="help-topic" condition="NOT REGEXP"/>
+ <remark role="help-syntax-begin"/>
+
<para>
<indexterm type="function">
<primary>NOT REGEXP</primary>
</indexterm>
<literal><replaceable>expr</replaceable> NOT REGEXP
- <replaceable>pat</replaceable></literal>,
+ <replaceable>pat</replaceable></literal>
<literal><replaceable>expr</replaceable> NOT RLIKE
<replaceable>pat</replaceable></literal>
</para>
+ <remark role="help-syntax-end"/>
+
+ <remark role="help-description-begin"/>
+
<para>
This is the same as <literal>NOT
(<replaceable>expr</replaceable> REGEXP
<replaceable>pat</replaceable>)</literal>.
</para>
- <remark>
- end_description_for_help_topic
- </remark>
+ <remark role="help-description-end"/>
</listitem>
<listitem>
- <remark>
- description_for_help_topic RLIKE REGEXP
+ <remark role="help-topic" condition="RLIKE"/>
+
+ <remark role="help-keywords">
+ REGEXP
</remark>
+ <remark role="help-syntax-begin"/>
+
<para>
<indexterm>
<primary>mSQL compatibility</primary>
@@ -4085,11 +4153,15 @@
</indexterm>
<literal><replaceable>expr</replaceable> REGEXP
- <replaceable>pat</replaceable></literal>,
+ <replaceable>pat</replaceable></literal>
<literal><replaceable>expr</replaceable> RLIKE
<replaceable>pat</replaceable></literal>
</para>
+ <remark role="help-syntax-end"/>
+
+ <remark role="help-description-begin"/>
+
<para>
Performs a pattern match of a string expression
<replaceable>expr</replaceable> against a pattern
@@ -4126,13 +4198,9 @@
sensitive for normal (not binary) strings.
</para>
- <remark>
- end_description_for_help_topic
- </remark>
+ <remark role="help-description-end"/>
- <remark>
- example_for_help_topic RLIKE
- </remark>
+ <remark role="help-example" condition="RLIKE"/>
<programlisting>
mysql> <userinput>SELECT 'Monty!' REGEXP 'm%y%%';</userinput>
@@ -4156,10 +4224,10 @@
</listitem>
<listitem>
- <remark>
- description_for_help_topic STRCMP
- </remark>
+ <remark role="help-topic" condition="STRCMP"/>
+ <remark role="help-syntax-begin"/>
+
<para>
<indexterm type="function">
<primary>STRCMP()</primary>
@@ -4168,6 +4236,10 @@
<literal>STRCMP(<replaceable>expr1</replaceable>,<replaceable>expr2</replaceable>)</literal>
</para>
+ <remark role="help-syntax-end"/>
+
+ <remark role="help-description-begin"/>
+
<para>
<literal>STRCMP()</literal> returns
<literal>0</literal> if
the strings are the same, <literal>-1</literal> if the first
@@ -4175,13 +4247,9 @@
sort order, and <literal>1</literal> otherwise.
</para>
- <remark>
- end_description_for_help_topic
- </remark>
+ <remark role="help-description-end"/>
- <remark>
- example_for_help_topic STRCMP
- </remark>
+ <remark role="help-example" condition="STRCMP"/>
<programlisting>
mysql> <userinput>SELECT STRCMP('text', 'text2');</userinput>
@@ -4212,10 +4280,6 @@
<title id="title-numeric-functions">&title-numeric-functions;</title>
- <remark>
- help_category Numeric Functions@Functions
- </remark>
-
<section id="arithmetic-functions">
<title
id="title-arithmetic-functions">&title-arithmetic-functions;</title>
@@ -4225,6 +4289,8 @@
<secondary>cast</secondary>
</indexterm>
+ <remark role="help-category" condition="Numeric Functions@Functions"/>
+
<para>
The usual arithmetic operators are available. Note that in the
case of <literal>-</literal>, <literal>+</literal>, and
@@ -4247,10 +4313,10 @@
<itemizedlist>
<listitem>
- <remark>
- description_for_help_topic +
- </remark>
+ <remark role="help-topic" condition="+"/>
+ <remark role="help-syntax-begin"/>
+
<para>
<indexterm type="function">
<primary>+ (addition)</primary>
@@ -4263,17 +4329,17 @@
<literal>+</literal>
</para>
+ <remark role="help-syntax-end"/>
+
+ <remark role="help-description-begin"/>
+
<para>
Addition:
</para>
- <remark>
- end_description_for_help_topic
- </remark>
+ <remark role="help-description-end"/>
- <remark>
- example_for_help_topic +
- </remark>
+ <remark role="help-example" condition="+"/>
<programlisting>
mysql> <userinput>SELECT 3+5;</userinput>
@@ -4282,10 +4348,10 @@
</listitem>
<listitem>
- <remark>
- description_for_help_topic - binary
- </remark>
+ <remark role="help-topic" condition="- binary"/>
+ <remark role="help-syntax-begin"/>
+
<para>
<indexterm type="function">
<primary>- (subtraction)</primary>
@@ -4298,17 +4364,17 @@
<literal>-</literal>
</para>
+ <remark role="help-syntax-end"/>
+
+ <remark role="help-description-begin"/>
+
<para>
Subtraction:
</para>
- <remark>
- end_description_for_help_topic
- </remark>
+ <remark role="help-description-end"/>
- <remark>
- example_for_help_topic - binary
- </remark>
+ <remark role="help-example" condition="- binary"/>
<programlisting>
mysql> <userinput>SELECT 3-5;</userinput>
@@ -4317,10 +4383,10 @@
</listitem>
<listitem>
- <remark>
- description_for_help_topic - unary
- </remark>
+ <remark role="help-topic" condition="- unary"/>
+ <remark role="help-syntax-begin"/>
+
<para>
<indexterm type="function">
<primary>- (unary minus)</primary>
@@ -4338,17 +4404,17 @@
<literal>-</literal>
</para>
+ <remark role="help-syntax-end"/>
+
+ <remark role="help-description-begin"/>
+
<para>
Unary minus. Changes the sign of the argument.
</para>
- <remark>
- end_description_for_help_topic
- </remark>
+ <remark role="help-description-end"/>
- <remark>
- example_for_help_topic - unary
- </remark>
+ <remark role="help-example" condition="- unary"/>
<programlisting>
mysql> <userinput>SELECT - 2;</userinput>
@@ -4365,10 +4431,10 @@
</listitem>
<listitem>
- <remark>
- description_for_help_topic *
- </remark>
+ <remark role="help-topic" condition="*"/>
+ <remark role="help-syntax-begin"/>
+
<para>
<indexterm type="function">
<primary>* (multiplication)</primary>
@@ -4381,17 +4447,17 @@
<literal>*</literal>
</para>
+ <remark role="help-syntax-end"/>
+
+ <remark role="help-description-begin"/>
+
<para>
Multiplication:
</para>
- <remark>
- end_description_for_help_topic
- </remark>
+ <remark role="help-description-end"/>
- <remark>
- example_for_help_topic *
- </remark>
+ <remark role="help-example" condition="*"/>
<programlisting>
mysql> <userinput>SELECT 3*5;</userinput>
@@ -4410,10 +4476,10 @@
</listitem>
<listitem>
- <remark>
- description_for_help_topic /
- </remark>
+ <remark role="help-topic" condition="/"/>
+ <remark role="help-syntax-begin"/>
+
<para>
<indexterm type="function">
<primary>/ (division)</primary>
@@ -4426,17 +4492,17 @@
<literal>/</literal>
</para>
+ <remark role="help-syntax-end"/>
+
+ <remark role="help-description-begin"/>
+
<para>
Division:
</para>
- <remark>
- end_description_for_help_topic
- </remark>
+ <remark role="help-description-end"/>
- <remark>
- example_for_help_topic /
- </remark>
+ <remark role="help-example" condition="/"/>
<programlisting>
mysql> <userinput>SELECT 3/5;</userinput>
@@ -4460,10 +4526,14 @@
</listitem>
<listitem>
- <remark>
- description_for_help_topic DIV FLOOR BIGINT
+ <remark role="help-topic" condition="DIV"/>
+
+ <remark role="help-keywords">
+ FLOOR BIGINT
</remark>
+ <remark role="help-syntax-begin"/>
+
<para>
<indexterm type="function">
<primary>DIV</primary>
@@ -4472,18 +4542,18 @@
<literal>DIV</literal>
</para>
+ <remark role="help-syntax-end"/>
+
+ <remark role="help-description-begin"/>
+
<para>
Integer division. Similar to <literal>FLOOR()</literal> but
safe with <literal>BIGINT</literal> values.
</para>
- <remark>
- end_description_for_help_topic
- </remark>
+ <remark role="help-description-end"/>
- <remark>
- example_for_help_topic DIV
- </remark>
+ <remark role="help-example" condition="DIV"/>
<programlisting>
mysql> <userinput>SELECT 5 DIV 2;</userinput>
@@ -4503,6 +4573,8 @@
<title
id="title-mathematical-functions">&title-mathematical-functions;</title>
+ <remark role="help-category" condition="Numeric Functions@Functions"/>
+
<para>
All mathematical functions return <literal>NULL</literal> in
case of an error.
@@ -4520,10 +4592,10 @@
<itemizedlist>
<listitem>
- <remark>
- description_for_help_topic ABS
- </remark>
+ <remark role="help-topic" condition="ABS"/>
+ <remark role="help-syntax-begin"/>
+
<para>
<indexterm type="function">
<primary>ABS()</primary>
@@ -4532,17 +4604,17 @@
<literal>ABS(<replaceable>X</replaceable>)</literal>
</para>
+ <remark role="help-syntax-end"/>
+
+ <remark role="help-description-begin"/>
+
<para>
Returns the absolute value of <replaceable>X</replaceable>.
</para>
- <remark>
- end_description_for_help_topic
- </remark>
+ <remark role="help-description-end"/>
- <remark>
- example_for_help_topic ABS
- </remark>
+ <remark role="help-example" condition="ABS"/>
<programlisting>
mysql> <userinput>SELECT ABS(2);</userinput>
@@ -4558,10 +4630,10 @@
</listitem>
<listitem>
- <remark>
- description_for_help_topic ACOS
- </remark>
+ <remark role="help-topic" condition="ACOS"/>
+ <remark role="help-syntax-begin"/>
+
<para>
<indexterm type="function">
<primary>ACOS()</primary>
@@ -4570,6 +4642,10 @@
<literal>ACOS(<replaceable>X</replaceable>)</literal>
</para>
+ <remark role="help-syntax-end"/>
+
+ <remark role="help-description-begin"/>
+
<para>
Returns the arc cosine of <replaceable>X</replaceable>, that
is, the value whose cosine is <replaceable>X</replaceable>.
@@ -4578,13 +4654,9 @@
<literal>-1</literal> to <literal>1</literal>.
</para>
- <remark>
- end_description_for_help_topic
- </remark>
+ <remark role="help-description-end"/>
- <remark>
- example_for_help_topic ACOS
- </remark>
+ <remark role="help-example" condition="ACOS"/>
<programlisting>
mysql> <userinput>SELECT ACOS(1);</userinput>
@@ -4597,10 +4669,10 @@
</listitem>
<listitem>
- <remark>
- description_for_help_topic ASIN
- </remark>
+ <remark role="help-topic" condition="ASIN"/>
+ <remark role="help-syntax-begin"/>
+
<para>
<indexterm type="function">
<primary>ASIN()</primary>
@@ -4609,6 +4681,10 @@
<literal>ASIN(<replaceable>X</replaceable>)</literal>
</para>
+ <remark role="help-syntax-end"/>
+
+ <remark role="help-description-begin"/>
+
<para>
Returns the arc sine of <replaceable>X</replaceable>, that
is, the value whose sine is <replaceable>X</replaceable>.
@@ -4617,13 +4693,9 @@
<literal>-1</literal> to <literal>1</literal>.
</para>
- <remark>
- end_description_for_help_topic
- </remark>
+ <remark role="help-description-end"/>
- <remark>
- example_for_help_topic ASIN
- </remark>
+ <remark role="help-example" condition="ASIN"/>
<programlisting>
mysql> <userinput>SELECT ASIN(0.2);</userinput>
@@ -4634,10 +4706,10 @@
</listitem>
<listitem>
- <remark>
- description_for_help_topic ATAN
- </remark>
+ <remark role="help-topic" condition="ATAN"/>
+ <remark role="help-syntax-begin"/>
+
<para>
<indexterm type="function">
<primary>ATAN()</primary>
@@ -4646,19 +4718,19 @@
<literal>ATAN(<replaceable>X</replaceable>)</literal>
</para>
+ <remark role="help-syntax-end"/>
+
+ <remark role="help-description-begin"/>
+
<para>
Returns the arc tangent of <replaceable>X</replaceable>,
that is, the value whose tangent is
<replaceable>X</replaceable>.
</para>
- <remark>
- end_description_for_help_topic
- </remark>
+ <remark role="help-description-end"/>
- <remark>
- example_for_help_topic ATAN
- </remark>
+ <remark role="help-example" condition="ATAN"/>
<programlisting>
mysql> <userinput>SELECT ATAN(2);</userinput>
@@ -4669,10 +4741,10 @@
</listitem>
<listitem>
- <remark>
- description_for_help_topic ATAN2
- </remark>
+ <remark role="help-topic" condition="ATAN2"/>
+ <remark role="help-syntax-begin"/>
+
<para>
<indexterm type="function">
<primary>ATAN2()</primary>
@@ -4683,6 +4755,10 @@
<literal>ATAN2(<replaceable>Y</replaceable>,<replaceable>X</replaceable>)</literal>
</para>
+ <remark role="help-syntax-end"/>
+
+ <remark role="help-description-begin"/>
+
<para>
Returns the arc tangent of the two variables
<replaceable>X</replaceable> and
@@ -4693,13 +4769,9 @@
of the result.
</para>
- <remark>
- end_description_for_help_topic
- </remark>
+ <remark role="help-description-end"/>
- <remark>
- example_for_help_topic ATAN2
- </remark>
+ <remark role="help-example" condition="ATAN2"/>
<programlisting>
mysql> <userinput>SELECT ATAN(-2,2);</userinput>
@@ -4710,31 +4782,35 @@
</listitem>
<listitem>
- <remark>
- description_for_help_topic CEILING CEIL
+ <remark role="help-topic" condition="CEILING"/>
+
+ <remark role="help-keywords">
+ CEIL
</remark>
+ <remark role="help-syntax-begin"/>
+
<para>
<indexterm type="function">
<primary>CEILING()</primary>
</indexterm>
-
<literal>CEILING(<replaceable>X</replaceable>)</literal>,
+
<literal>CEILING(<replaceable>X</replaceable>)</literal>
<literal>CEIL(<replaceable>X</replaceable>)</literal>
</para>
+ <remark role="help-syntax-end"/>
+
+ <remark role="help-description-begin"/>
+
<para>
Returns the smallest integer value not less than
<replaceable>X</replaceable>.
</para>
- <remark>
- end_description_for_help_topic
- </remark>
+ <remark role="help-description-end"/>
- <remark>
- example_for_help_topic CEILING
- </remark>
+ <remark role="help-example" condition="CEILING"/>
<programlisting>
mysql> <userinput>SELECT CEILING(1.23);</userinput>
@@ -4755,10 +4831,10 @@
</listitem>
<listitem>
- <remark>
- description_for_help_topic COS
- </remark>
+ <remark role="help-topic" condition="COS"/>
+ <remark role="help-syntax-begin"/>
+
<para>
<indexterm type="function">
<primary>COS()</primary>
@@ -4767,18 +4843,18 @@
<literal>COS(<replaceable>X</replaceable>)</literal>
</para>
+ <remark role="help-syntax-end"/>
+
+ <remark role="help-description-begin"/>
+
<para>
Returns the cosine of <replaceable>X</replaceable>, where
<replaceable>X</replaceable> is given in radians.
</para>
- <remark>
- end_description_for_help_topic
- </remark>
+ <remark role="help-description-end"/>
- <remark>
- example_for_help_topic COS
- </remark>
+ <remark role="help-example" condition="COS"/>
<programlisting>
mysql> <userinput>SELECT COS(PI());</userinput>
@@ -4787,10 +4863,10 @@
</listitem>
<listitem>
- <remark>
- description_for_help_topic COT
- </remark>
+ <remark role="help-topic" condition="COT"/>
+ <remark role="help-syntax-begin"/>
+
<para>
<indexterm type="function">
<primary>COT()</primary>
@@ -4799,17 +4875,17 @@
<literal>COT(<replaceable>X</replaceable>)</literal>
</para>
+ <remark role="help-syntax-end"/>
+
+ <remark role="help-description-begin"/>
+
<para>
Returns the cotangent of <replaceable>X</replaceable>.
</para>
- <remark>
- end_description_for_help_topic
- </remark>
+ <remark role="help-description-end"/>
- <remark>
- example_for_help_topic COT
- </remark>
+ <remark role="help-example" condition="COT"/>
<programlisting>
mysql> <userinput>SELECT COT(12);</userinput>
@@ -4820,10 +4896,10 @@
</listitem>
<listitem>
- <remark>
- description_for_help_topic CRC32
- </remark>
+ <remark role="help-topic" condition="CRC32"/>
+ <remark role="help-syntax-begin"/>
+
<para>
<indexterm type="function">
<primary>CRC32()</primary>
@@ -4832,6 +4908,10 @@
<literal>CRC32(<replaceable>expr</replaceable>)</literal>
</para>
+ <remark role="help-syntax-end"/>
+
+ <remark role="help-description-begin"/>
+
<para>
Computes a cyclic redundancy check value and returns a
32-bit unsigned value. The result is <literal>NULL</literal>
@@ -4839,13 +4919,9 @@
expected be a string and is treated as one if it is not.
</para>
- <remark>
- end_description_for_help_topic
- </remark>
+ <remark role="help-description-end"/>
- <remark>
- example_for_help_topic CRC32
- </remark>
+ <remark role="help-example" condition="CRC32"/>
<programlisting>
mysql> <userinput>SELECT CRC32('MySQL');</userinput>
@@ -4858,10 +4934,10 @@
</listitem>
<listitem>
- <remark>
- description_for_help_topic DEGREES
- </remark>
+ <remark role="help-topic" condition="DEGREES"/>
+ <remark role="help-syntax-begin"/>
+
<para>
<indexterm type="function">
<primary>DEGREES()</primary>
@@ -4870,18 +4946,18 @@
<literal>DEGREES(<replaceable>X</replaceable>)</literal>
</para>
+ <remark role="help-syntax-end"/>
+
+ <remark role="help-description-begin"/>
+
<para>
Returns the argument <replaceable>X</replaceable>, converted
from radians to degrees.
</para>
- <remark>
- end_description_for_help_topic
- </remark>
+ <remark role="help-description-end"/>
- <remark>
- example_for_help_topic DEGREES
- </remark>
+ <remark role="help-example" condition="DEGREES"/>
<programlisting>
mysql> <userinput>SELECT DEGREES(PI());</userinput>
@@ -4890,10 +4966,10 @@
</listitem>
<listitem>
- <remark>
- description_for_help_topic EXP
- </remark>
+ <remark role="help-topic" condition="EXP"/>
+ <remark role="help-syntax-begin"/>
+
<para>
<indexterm type="function">
<primary>EXP()</primary>
@@ -4902,19 +4978,19 @@
<literal>EXP(<replaceable>X</replaceable>)</literal>
</para>
+ <remark role="help-syntax-end"/>
+
+ <remark role="help-description-begin"/>
+
<para>
Returns the value of <literal>e</literal> (the base of
natural logarithms) raised to the power of
<replaceable>X</replaceable>.
</para>
- <remark>
- end_description_for_help_topic
- </remark>
+ <remark role="help-description-end"/>
- <remark>
- example_for_help_topic EXP
- </remark>
+ <remark role="help-example" condition="EXP"/>
<programlisting>
mysql> <userinput>SELECT EXP(2);</userinput>
@@ -4925,10 +5001,10 @@
</listitem>
<listitem>
- <remark>
- description_for_help_topic FLOOR
- </remark>
+ <remark role="help-topic" condition="FLOOR"/>
+ <remark role="help-syntax-begin"/>
+
<para>
<indexterm type="function">
<primary>FLOOR()</primary>
@@ -4937,18 +5013,18 @@
<literal>FLOOR(<replaceable>X</replaceable>)</literal>
</para>
+ <remark role="help-syntax-end"/>
+
+ <remark role="help-description-begin"/>
+
<para>
Returns the largest integer value not greater than
<replaceable>X</replaceable>.
</para>
- <remark>
- end_description_for_help_topic
- </remark>
+ <remark role="help-description-end"/>
- <remark>
- example_for_help_topic FLOOR
- </remark>
+ <remark role="help-example" condition="FLOOR"/>
<programlisting>
mysql> <userinput>SELECT FLOOR(1.23);</userinput>
@@ -4978,10 +5054,10 @@
</listitem>
<listitem>
- <remark>
- description_for_help_topic LN
- </remark>
+ <remark role="help-topic" condition="LN"/>
+ <remark role="help-syntax-begin"/>
+
<para>
<indexterm type="function">
<primary>LN()</primary>
@@ -4990,18 +5066,18 @@
<literal>LN(<replaceable>X</replaceable>)</literal>
</para>
+ <remark role="help-syntax-end"/>
+
+ <remark role="help-description-begin"/>
+
<para>
Returns the natural logarithm of
<replaceable>X</replaceable>.
</para>
- <remark>
- end_description_for_help_topic
- </remark>
+ <remark role="help-description-end"/>
- <remark>
- example_for_help_topic LN
- </remark>
+ <remark role="help-example" condition="LN"/>
<programlisting>
mysql> <userinput>SELECT LN(2);</userinput>
@@ -5018,31 +5094,31 @@
</listitem>
<listitem>
- <remark>
- description_for_help_topic LOG
- </remark>
+ <remark role="help-topic" condition="LOG"/>
+ <remark role="help-syntax-begin"/>
+
<para>
<indexterm type="function">
<primary>LOG()</primary>
</indexterm>
- <literal>LOG(<replaceable>X</replaceable>)</literal>,
+ <literal>LOG(<replaceable>X</replaceable>)</literal>
<literal>LOG(<replaceable>B</replaceable>,<replaceable>X</replaceable>)</literal>
</para>
+ <remark role="help-syntax-end"/>
+
+ <remark role="help-description-begin"/>
+
<para>
If called with one parameter, this function returns the
natural logarithm of <replaceable>X</replaceable>.
</para>
- <remark>
- end_description_for_help_topic
- </remark>
+ <remark role="help-description-end"/>
- <remark>
- example_for_help_topic LOG
- </remark>
+ <remark role="help-example" condition="LOG"/>
<programlisting>
mysql> <userinput>SELECT LOG(2);</userinput>
@@ -5073,10 +5149,10 @@
</listitem>
<listitem>
- <remark>
- description_for_help_topic LOG2
- </remark>
+ <remark role="help-topic" condition="LOG2"/>
+ <remark role="help-syntax-begin"/>
+
<para>
<indexterm type="function">
<primary>LOG2()</primary>
@@ -5085,18 +5161,18 @@
<literal>LOG2(<replaceable>X</replaceable>)</literal>
</para>
+ <remark role="help-syntax-end"/>
+
+ <remark role="help-description-begin"/>
+
<para>
Returns the base-2 logarithm of
<literal><replaceable>X</replaceable></literal>.
</para>
- <remark>
- end_description_for_help_topic
- </remark>
+ <remark role="help-description-end"/>
- <remark>
- example_for_help_topic LOG2
- </remark>
+ <remark role="help-example" condition="LOG2"/>
<programlisting>
mysql> <userinput>SELECT LOG2(65536);</userinput>
@@ -5115,10 +5191,10 @@
</listitem>
<listitem>
- <remark>
- description_for_help_topic LOG10
- </remark>
+ <remark role="help-topic" condition="LOG10"/>
+ <remark role="help-syntax-begin"/>
+
<para>
<indexterm type="function">
<primary>LOG10()</primary>
@@ -5127,18 +5203,18 @@
<literal>LOG10(<replaceable>X</replaceable>)</literal>
</para>
+ <remark role="help-syntax-end"/>
+
+ <remark role="help-description-begin"/>
+
<para>
Returns the base-10 logarithm of
<replaceable>X</replaceable>.
</para>
- <remark>
- end_description_for_help_topic
- </remark>
+ <remark role="help-description-end"/>
- <remark>
- example_for_help_topic LOG10
- </remark>
+ <remark role="help-example" condition="LOG10"/>
<programlisting>
mysql> <userinput>SELECT LOG10(2);</userinput>
@@ -5151,10 +5227,14 @@
</listitem>
<listitem>
- <remark>
- description_for_help_topic % MOD
+ <remark role="help-topic" condition="%"/>
+
+ <remark role="help-keywords">
+ MOD
</remark>
+ <remark role="help-syntax-begin"/>
+
<para>
<indexterm type="function">
<primary>MOD()</primary>
@@ -5178,24 +5258,24 @@
<literal>MOD(<replaceable>N</replaceable>,<replaceable>M</replaceable>)</literal>
, <literal><replaceable>N</replaceable> %
- <replaceable>M</replaceable></literal>,
+ <replaceable>M</replaceable></literal>
<literal><replaceable>N</replaceable> MOD
<replaceable>M</replaceable></literal>
</para>
+ <remark role="help-syntax-end"/>
+
+ <remark role="help-description-begin"/>
+
<para>
Modulo operation. Returns the remainder of
<replaceable>N</replaceable> divided by
<replaceable>M</replaceable>.
</para>
- <remark>
- end_description_for_help_topic
- </remark>
+ <remark role="help-description-end"/>
- <remark>
- example_for_help_topic %
- </remark>
+ <remark role="help-example" condition="%"/>
<programlisting>
mysql> <userinput>SELECT MOD(234, 10);</userinput>
@@ -5239,10 +5319,10 @@
</listitem>
<listitem>
- <remark>
- description_for_help_topic PI
- </remark>
+ <remark role="help-topic" condition="PI"/>
+ <remark role="help-syntax-begin"/>
+
<para>
<indexterm type="function">
<primary>PI()</primary>
@@ -5251,19 +5331,19 @@
<literal>PI()</literal>
</para>
+ <remark role="help-syntax-end"/>
+
+ <remark role="help-description-begin"/>
+
<para>
Returns the value of <emphasis>pi</emphasis> (π). The
default number of decimals displayed is five, but MySQL
internally uses the full double-precision value.
</para>
- <remark>
- end_description_for_help_topic
- </remark>
+ <remark role="help-description-end"/>
- <remark>
- example_for_help_topic PI
- </remark>
+ <remark role="help-example" condition="PI"/>
<programlisting>
mysql> <userinput>SELECT PI();</userinput>
@@ -5274,10 +5354,14 @@
</listitem>
<listitem>
- <remark>
- description_for_help_topic POWER POW
+ <remark role="help-topic" condition="POWER"/>
+
+ <remark role="help-keywords">
+ POW
</remark>
+ <remark role="help-syntax-begin"/>
+
<para>
<indexterm type="function">
<primary>POW()</primary>
@@ -5292,18 +5376,18 @@
<literal>POWER(<replaceable>X</replaceable>,<replaceable>Y</replaceable>)</literal>
</para>
+ <remark role="help-syntax-end"/>
+
+ <remark role="help-description-begin"/>
+
<para>
Returns the value of <replaceable>X</replaceable> raised to
the power of <replaceable>Y</replaceable>.
</para>
- <remark>
- end_description_for_help_topic
- </remark>
+ <remark role="help-description-end"/>
- <remark>
- example_for_help_topic POWER
- </remark>
+ <remark role="help-example" condition="POWER"/>
<programlisting>
mysql> <userinput>SELECT POW(2,2);</userinput>
@@ -5314,10 +5398,10 @@
</listitem>
<listitem>
- <remark>
- description_for_help_topic RADIANS
- </remark>
+ <remark role="help-topic" condition="RADIANS"/>
+ <remark role="help-syntax-begin"/>
+
<para>
<indexterm type="function">
<primary>RADIANS()</primary>
@@ -5326,18 +5410,18 @@
<literal>RADIANS(<replaceable>X</replaceable>)</literal>
</para>
+ <remark role="help-syntax-end"/>
+
+ <remark role="help-description-begin"/>
+
<para>
Returns the argument <replaceable>X</replaceable>, converted
from degrees to radians.
</para>
- <remark>
- end_description_for_help_topic
- </remark>
+ <remark role="help-description-end"/>
- <remark>
- example_for_help_topic RADIANS
- </remark>
+ <remark role="help-example" condition="RADIANS"/>
<programlisting>
mysql> <userinput>SELECT RADIANS(90);</userinput>
@@ -5346,19 +5430,23 @@
</listitem>
<listitem>
- <remark>
- description_for_help_topic RAND
- </remark>
+ <remark role="help-topic" condition="RAND"/>
+ <remark role="help-syntax-begin"/>
+
<para>
<indexterm type="function">
<primary>RAND()</primary>
</indexterm>
- <literal>RAND()</literal>,
+ <literal>RAND()</literal>
<literal>RAND(<replaceable>N</replaceable>)</literal>
</para>
+ <remark role="help-syntax-end"/>
+
+ <remark role="help-description-begin"/>
+
<para>
Returns a random floating-point value in the range from
<literal>0</literal> to <literal>1.0</literal>. If an
@@ -5367,13 +5455,9 @@
sequence).
</para>
- <remark>
- end_description_for_help_topic
- </remark>
+ <remark role="help-description-end"/>
- <remark>
- example_for_help_topic RAND
- </remark>
+ <remark role="help-example" condition="RAND"/>
<programlisting>
mysql> <userinput>SELECT RAND();</userinput>
@@ -5426,19 +5510,23 @@
</listitem>
<listitem>
- <remark>
- description_for_help_topic ROUND
- </remark>
+ <remark role="help-topic" condition="ROUND"/>
+ <remark role="help-syntax-begin"/>
+
<para>
<indexterm type="function">
<primary>ROUND()</primary>
</indexterm>
-
<literal>ROUND(<replaceable>X</replaceable>)</literal>,
+
<literal>ROUND(<replaceable>X</replaceable>)</literal>
<literal>ROUND(<replaceable>X</replaceable>,<replaceable>D</replaceable>)</literal>
</para>
+ <remark role="help-syntax-end"/>
+
+ <remark role="help-description-begin"/>
+
<para>
Returns the argument <replaceable>X</replaceable>, rounded
to the nearest integer. With two arguments, returns
@@ -5449,13 +5537,9 @@
point of the value <replaceable>X</replaceable>.
</para>
- <remark>
- end_description_for_help_topic
- </remark>
+ <remark role="help-description-end"/>
- <remark>
- example_for_help_topic ROUND
- </remark>
+ <remark role="help-example" condition="ROUND"/>
<programlisting>
mysql> <userinput>SELECT ROUND(-1.23);</userinput>
@@ -5492,10 +5576,10 @@
</listitem>
<listitem>
- <remark>
- description_for_help_topic SIGN
- </remark>
+ <remark role="help-topic" condition="SIGN"/>
+ <remark role="help-syntax-begin"/>
+
<para>
<indexterm type="function">
<primary>SIGN()</primary>
@@ -5504,6 +5588,10 @@
<literal>SIGN(<replaceable>X</replaceable>)</literal>
</para>
+ <remark role="help-syntax-end"/>
+
+ <remark role="help-description-begin"/>
+
<para>
Returns the sign of the argument as <literal>-1</literal>,
<literal>0</literal>, or <literal>1</literal>,
depending on
@@ -5511,13 +5599,9 @@
positive.
</para>
- <remark>
- end_description_for_help_topic
- </remark>
+ <remark role="help-description-end"/>
- <remark>
- example_for_help_topic SIGN
- </remark>
+ <remark role="help-example" condition="SIGN"/>
<programlisting>
mysql> <userinput>SELECT SIGN(-32);</userinput>
@@ -5530,10 +5614,10 @@
</listitem>
<listitem>
- <remark>
- description_for_help_topic SIN
- </remark>
+ <remark role="help-topic" condition="SIN"/>
+ <remark role="help-syntax-begin"/>
+
<para>
<indexterm type="function">
<primary>SIN()</primary>
@@ -5542,18 +5626,18 @@
<literal>SIN(<replaceable>X</replaceable>)</literal>
</para>
+ <remark role="help-syntax-end"/>
+
+ <remark role="help-description-begin"/>
+
<para>
Returns the sine of <replaceable>X</replaceable>, where
<replaceable>X</replaceable> is given in radians.
</para>
- <remark>
- end_description_for_help_topic
- </remark>
+ <remark role="help-description-end"/>
- <remark>
- example_for_help_topic SIN
- </remark>
+ <remark role="help-example" condition="SIN"/>
<programlisting>
mysql> <userinput>SELECT SIN(PI());</userinput>
@@ -5562,10 +5646,10 @@
</listitem>
<listitem>
- <remark>
- description_for_help_topic SQRT
- </remark>
+ <remark role="help-topic" condition="SQRT"/>
+ <remark role="help-syntax-begin"/>
+
<para>
<indexterm type="function">
<primary>SQRT()</primary>
@@ -5574,18 +5658,18 @@
<literal>SQRT(<replaceable>X</replaceable>)</literal>
</para>
+ <remark role="help-syntax-end"/>
+
+ <remark role="help-description-begin"/>
+
<para>
Returns the non-negative square root of
<replaceable>X</replaceable>.
</para>
- <remark>
- end_description_for_help_topic
- </remark>
+ <remark role="help-description-end"/>
- <remark>
- example_for_help_topic SQRT
- </remark>
+ <remark role="help-example" condition="SQRT"/>
<programlisting>
mysql> <userinput>SELECT SQRT(4);</userinput>
@@ -5596,10 +5680,10 @@
</listitem>
<listitem>
- <remark>
- description_for_help_topic TAN
- </remark>
+ <remark role="help-topic" condition="TAN"/>
+ <remark role="help-syntax-begin"/>
+
<para>
<indexterm type="function">
<primary>TAN()</primary>
@@ -5608,18 +5692,18 @@
<literal>TAN(<replaceable>X</replaceable>)</literal>
</para>
+ <remark role="help-syntax-end"/>
+
+ <remark role="help-description-begin"/>
+
<para>
Returns the tangent of <replaceable>X</replaceable>, where
<replaceable>X</replaceable> is given in radians.
</para>
- <remark>
- end_description_for_help_topic
- </remark>
+ <remark role="help-description-end"/>
- <remark>
- example_for_help_topic TAN
- </remark>
+ <remark role="help-example" condition="TAN"/>
<programlisting>
mysql> <userinput>SELECT TAN(PI()+1);</userinput>
@@ -5628,10 +5712,10 @@
</listitem>
<listitem>
- <remark>
- description_for_help_topic TRUNCATE
- </remark>
+ <remark role="help-topic" condition="TRUNCATE"/>
+ <remark role="help-syntax-begin"/>
+
<para>
<indexterm type="function">
<primary>TRUNCATE()</primary>
@@ -5640,6 +5724,10 @@
<literal>TRUNCATE(<replaceable>X</replaceable>,<replaceable>D</replaceable>)</literal>
</para>
+ <remark role="help-syntax-end"/>
+
+ <remark role="help-description-begin"/>
+
<para>
Returns the number <replaceable>X</replaceable>, truncated
to <replaceable>D</replaceable> decimals. If
@@ -5650,13 +5738,9 @@
decimal point of the value <replaceable>X</replaceable>.
</para>
- <remark>
- end_description_for_help_topic
- </remark>
+ <remark role="help-description-end"/>
- <remark>
- example_for_help_topic TRUNCATE
- </remark>
+ <remark role="help-example" condition="TRUNCATE"/>
<programlisting>
mysql> <userinput>SELECT TRUNCATE(1.223,1);</userinput>
@@ -5687,9 +5771,7 @@
<title
id="title-date-and-time-functions">&title-date-and-time-functions;</title>
- <remark>
- help_category Date and Time Functions@Functions
- </remark>
+ <remark role="help-category" condition="Date and Time Functions@Functions"/>
<indexterm type="function">
<primary>date and time functions</primary>
@@ -5769,10 +5851,10 @@
<itemizedlist>
<listitem>
- <remark>
- description_for_help_topic ADDDATE
- </remark>
+ <remark role="help-topic" condition="ADDDATE"/>
+ <remark role="help-syntax-begin"/>
+
<para>
<indexterm type="function">
<primary>ADDDATE()</primary>
@@ -5780,10 +5862,14 @@
<literal>ADDDATE(<replaceable>date</replaceable>,INTERVAL
<replaceable>expr</replaceable>
- <replaceable>type</replaceable>)</literal>,
+ <replaceable>type</replaceable>)</literal>
<literal>ADDDATE(<replaceable>expr</replaceable>,<replaceable>days</replaceable>)</literal>
</para>
+ <remark role="help-syntax-end"/>
+
+ <remark role="help-description-begin"/>
+
<para>
When invoked with the <literal>INTERVAL</literal> form of the
second argument, <literal>ADDDATE()</literal> is a synonym for
@@ -5813,16 +5899,14 @@
-> '1998-02-02'
</programlisting>
- <remark>
- end_description_for_help_topic
- </remark>
+ <remark role="help-description-end"/>
</listitem>
<listitem>
- <remark>
- description_for_help_topic ADDTIME
- </remark>
+ <remark role="help-topic" condition="ADDTIME"/>
+ <remark role="help-syntax-begin"/>
+
<para>
<indexterm type="function">
<primary>ADDTIME()</primary>
@@ -5831,10 +5915,14 @@
<literal>ADDTIME(<replaceable>expr</replaceable>,<replaceable>expr2</replaceable>)</literal>
</para>
+ <remark role="help-syntax-end"/>
+
<remark role="todo">
DESCRIPTION. Depends on SAP/MySQL mode.
</remark>
+ <remark role="help-description-begin"/>
+
<para>
<literal>ADDTIME()</literal> adds
<replaceable>expr2</replaceable> to
@@ -5844,13 +5932,9 @@
expression.
</para>
- <remark>
- end_description_for_help_topic
- </remark>
+ <remark role="help-description-end"/>
- <remark>
- example_for_help_topic ADDTIME
- </remark>
+ <remark role="help-example" condition="ADDTIME"/>
<programlisting>
mysql> <userinput>SELECT ADDTIME('1997-12-31
23:59:59.999999',</userinput>
@@ -5866,10 +5950,10 @@
</listitem>
<listitem>
- <remark>
- description_for_help_topic CONVERT_TZ
- </remark>
+ <remark role="help-topic" condition="CONVERT_TZ"/>
+ <remark role="help-syntax-begin"/>
+
<para>
<indexterm type="function">
<primary>CONVERT_TZ()</primary>
@@ -5878,6 +5962,10 @@
<literal>CONVERT_TZ(<replaceable>dt</replaceable>,<replaceable>from_tz</replaceable>,<replaceable>to_tz</replaceable>)</literal>
</para>
+ <remark role="help-syntax-end"/>
+
+ <remark role="help-description-begin"/>
+
<para>
<literal>CONVERT_TZ()</literal> converts a datetime value
<replaceable>dt</replaceable> from time zone given by
@@ -5888,9 +5976,7 @@
<literal>NULL</literal> if the arguments are invalid.
</para>
- <remark>
- end_description_for_help_topic
- </remark>
+ <remark role="help-description-end"/>
<para>
If the value falls out of the supported range of the
@@ -5900,9 +5986,7 @@
<xref linkend="date-and-time-type-overview"/>.
</para>
- <remark>
- example_for_help_topic CONVERT_TZ
- </remark>
+ <remark role="help-example" condition="CONVERT_TZ"/>
<programlisting>
mysql> <userinput>SELECT CONVERT_TZ('2004-01-01
12:00:00','GMT','MET');</userinput>
@@ -5924,10 +6008,10 @@
</listitem>
<listitem>
- <remark>
- description_for_help_topic CURDATE
- </remark>
+ <remark role="help-topic" condition="CURDATE"/>
+ <remark role="help-syntax-begin"/>
+
<para>
<indexterm type="function">
<primary>CURDATE()</primary>
@@ -5936,6 +6020,10 @@
<literal>CURDATE()</literal>
</para>
+ <remark role="help-syntax-end"/>
+
+ <remark role="help-description-begin"/>
+
<para>
Returns the current date as a value in
<literal>'YYYY-MM-DD'</literal> or
<literal>YYYYMMDD</literal>
@@ -5943,13 +6031,9 @@
or numeric context.
</para>
- <remark>
- end_description_for_help_topic
- </remark>
+ <remark role="help-description-end"/>
- <remark>
- example_for_help_topic CURDATE
- </remark>
+ <remark role="help-example" condition="CURDATE"/>
<programlisting>
mysql> <userinput>SELECT CURDATE();</userinput>
@@ -5960,35 +6044,37 @@
</listitem>
<listitem>
- <remark>
- description_for_help_topic CURRENT_DATE
- </remark>
+ <remark role="help-topic" condition="CURRENT_DATE"/>
+ <remark role="help-syntax-begin"/>
+
<para>
<indexterm type="function">
<primary>CURRENT_DATE</primary>
</indexterm>
- <literal>CURRENT_DATE</literal>,
+ <literal>CURRENT_DATE</literal>
<literal>CURRENT_DATE()</literal>
</para>
+ <remark role="help-syntax-end"/>
+
+ <remark role="help-description-begin"/>
+
<para>
<literal>CURRENT_DATE</literal> and
<literal>CURRENT_DATE()</literal> are synonyms for
<literal>CURDATE()</literal>.
</para>
- <remark>
- end_description_for_help_topic
- </remark>
+ <remark role="help-description-end"/>
</listitem>
<listitem>
- <remark>
- description_for_help_topic CURTIME
- </remark>
+ <remark role="help-topic" condition="CURTIME"/>
+ <remark role="help-syntax-begin"/>
+
<para>
<indexterm type="function">
<primary>CURTIME()</primary>
@@ -5997,6 +6083,10 @@
<literal>CURTIME()</literal>
</para>
+ <remark role="help-syntax-end"/>
+
+ <remark role="help-description-begin"/>
+
<para>
Returns the current time as a value in
<literal>'HH:MM:SS'</literal> or
<literal>HHMMSS</literal>
@@ -6004,13 +6094,9 @@
or numeric context.
</para>
- <remark>
- end_description_for_help_topic
- </remark>
+ <remark role="help-description-end"/>
- <remark>
- example_for_help_topic CURTIME
- </remark>
+ <remark role="help-example" condition="CURTIME"/>
<programlisting>
mysql> <userinput>SELECT CURTIME();</userinput>
@@ -6021,60 +6107,68 @@
</listitem>
<listitem>
- <remark>
- description_for_help_topic CURRENT_TIME
- </remark>
+ <remark role="help-topic" condition="CURRENT_TIME"/>
+ <remark role="help-syntax-begin"/>
+
<para>
<indexterm type="function">
<primary>CURRENT_TIME</primary>
</indexterm>
- <literal>CURRENT_TIME</literal>,
+ <literal>CURRENT_TIME</literal>
<literal>CURRENT_TIME()</literal>
</para>
+ <remark role="help-syntax-end"/>
+
+ <remark role="help-description-begin"/>
+
<para>
<literal>CURRENT_TIME</literal> and
<literal>CURRENT_TIME()</literal> are synonyms for
<literal>CURTIME()</literal>.
</para>
- <remark>
- end_description_for_help_topic
- </remark>
+ <remark role="help-description-end"/>
</listitem>
<listitem>
- <remark>
- description_for_help_topic CURRENT_TIMESTAMP
- </remark>
+ <remark role="help-topic" condition="CURRENT_TIMESTAMP"/>
+ <remark role="help-syntax-begin"/>
+
<para>
<indexterm type="function">
<primary>CURRENT_TIMESTAMP</primary>
</indexterm>
- <literal>CURRENT_TIMESTAMP</literal>,
+ <literal>CURRENT_TIMESTAMP</literal>
<literal>CURRENT_TIMESTAMP()</literal>
</para>
+ <remark role="help-syntax-end"/>
+
+ <remark role="help-description-begin"/>
+
<para>
<literal>CURRENT_TIMESTAMP</literal> and
<literal>CURRENT_TIMESTAMP()</literal> are synonyms for
<literal>NOW()</literal>.
</para>
- <remark>
- end_description_for_help_topic
- </remark>
+ <remark role="help-description-end"/>
</listitem>
<listitem>
- <remark>
- description_for_help_topic DATE function DATE
+ <remark role="help-topic" condition="DATE function"/>
+
+ <remark role="help-keywords">
+ DATE
</remark>
+ <remark role="help-syntax-begin"/>
+
<para>
<indexterm type="function">
<primary>DATE()</primary>
@@ -6083,18 +6177,18 @@
<literal>DATE(<replaceable>expr</replaceable>)</literal>
</para>
+ <remark role="help-syntax-end"/>
+
+ <remark role="help-description-begin"/>
+
<para>
Extracts the date part of the date or datetime expression
<replaceable>expr</replaceable>.
</para>
- <remark>
- end_description_for_help_topic
- </remark>
+ <remark role="help-description-end"/>
- <remark>
- example_for_help_topic DATE function
- </remark>
+ <remark role="help-example" condition="DATE function"/>
<programlisting>
mysql> <userinput>SELECT DATE('2003-12-31 01:02:03');</userinput>
@@ -6107,10 +6201,10 @@
</listitem>
<listitem>
- <remark>
- description_for_help_topic DATEDIFF
- </remark>
+ <remark role="help-topic" condition="DATEDIFF"/>
+ <remark role="help-syntax-begin"/>
+
<para>
<indexterm type="function">
<primary>DATEDIFF()</primary>
@@ -6119,10 +6213,14 @@
<literal>DATEDIFF(<replaceable>expr</replaceable>,<replaceable>expr2</replaceable>)</literal>
</para>
+ <remark role="help-syntax-end"/>
+
<remark role="todo">
DESCRIPTION. Depends on SAP/MySQL mode.
</remark>
+ <remark role="help-description-begin"/>
+
<para>
<literal>DATEDIFF()</literal> returns the number of days
between the start date <replaceable>expr</replaceable> and the
@@ -6133,13 +6231,9 @@
calculation.
</para>
- <remark>
- end_description_for_help_topic
- </remark>
+ <remark role="help-description-end"/>
- <remark>
- example_for_help_topic DATEDIFF
- </remark>
+ <remark role="help-example" condition="DATEDIFF"/>
<programlisting>
mysql> <userinput>SELECT DATEDIFF('1997-12-31
23:59:59','1997-12-30');</userinput>
@@ -6154,13 +6248,14 @@
</listitem>
<listitem>
- <remark>
- description_for_help_topic DATE OPERATIONS DATE DATE_ADD
- DATE_SUB SECOND MINUTE HOUR DAY MONTH YEAR MINUTE_SECOND
- HOUR_MINUTE DAY_HOUR YEAR_MONTH HOUR_SECOND DAY_MINUTE
- DAY_SECOND INTERVAL
+ <remark role="help-topic" condition="DATE OPERATIONS"/>
+
+ <remark role="help-keywords">
+ DATE DATE_ADD
</remark>
+ <remark role="help-syntax-begin"/>
+
<para>
<indexterm type="function">
<primary>DATE_ADD()</primary>
@@ -6172,12 +6267,16 @@
<literal>DATE_ADD(<replaceable>date</replaceable>,INTERVAL
<replaceable>expr</replaceable>
- <replaceable>type</replaceable>)</literal>,
+ <replaceable>type</replaceable>)</literal>
<literal>DATE_SUB(<replaceable>date</replaceable>,INTERVAL
<replaceable>expr</replaceable>
<replaceable>type</replaceable>)</literal>
</para>
+ <remark role="help-syntax-end"/>
+
+ <remark role="help-description-begin"/>
+
<para>
These functions perform date arithmetic.
<replaceable>date</replaceable> is a
@@ -6191,9 +6290,7 @@
the expression should be interpreted.
</para>
- <remark>
- end_description_for_help_topic
- </remark>
+ <remark role="help-description-end"/>
<para>
The <literal>INTERVAL</literal> keyword and the
@@ -6358,9 +6455,7 @@
or datetime value from an interval. (See examples below.)
</para>
- <remark>
- example_for_help_topic DATE OPERATIONS
- </remark>
+ <remark role="help-example" condition="DATE OPERATIONS"/>
<programlisting>
mysql> <userinput>SELECT '1997-12-31 23:59:59' + INTERVAL 1
SECOND;</userinput>
@@ -6438,10 +6533,10 @@
</listitem>
<listitem>
- <remark>
- description_for_help_topic DATE_FORMAT
- </remark>
+ <remark role="help-topic" condition="DATE_FORMAT"/>
+ <remark role="help-syntax-begin"/>
+
<para>
<indexterm type="function">
<primary>DATE_FORMAT()</primary>
@@ -6450,10 +6545,19 @@
<literal>DATE_FORMAT(<replaceable>date</replaceable>,<replaceable>format</replaceable>)</literal>
</para>
+ <remark role="help-syntax-end"/>
+
+ <remark role="help-description-begin"/>
+
<para>
Formats the <replaceable>date</replaceable> value according to
- the <replaceable>format</replaceable> string. The following
- specifiers may be used in the
+ the <replaceable>format</replaceable> string.
+ </para>
+
+ <remark role="help-description-end"/>
+
+ <para>
+ The following specifiers may be used in the
<replaceable>format</replaceable> string:
</para>
@@ -6634,14 +6738,8 @@
<literal>'2004-00-00'</literal> to be stored as of MySQL 3.23.
</para>
- <remark>
- end_description_for_help_topic
- </remark>
+ <remark role="help-example" condition="DATE_FORMAT"/>
- <remark>
- example_for_help_topic DATE_FORMAT
- </remark>
-
<programlisting>
mysql> <userinput>SELECT DATE_FORMAT('1997-10-04 22:23:00', '%W %M
%Y');</userinput>
-> 'Saturday October 1997'
@@ -6659,10 +6757,10 @@
</listitem>
<listitem>
- <remark>
- description_for_help_topic DAY
- </remark>
+ <remark role="help-topic" condition="DAY"/>
+ <remark role="help-syntax-begin"/>
+
<para>
<indexterm type="function">
<primary>DAY()</primary>
@@ -6671,22 +6769,24 @@
<literal>DAY(<replaceable>date</replaceable>)</literal>
</para>
+ <remark role="help-syntax-end"/>
+
+ <remark role="help-description-begin"/>
+
<para>
<literal>DAY()</literal> is a synonym for
<literal>DAYOFMONTH()</literal>. It is available as of MySQL
4.1.1.
</para>
- <remark>
- end_description_for_help_topic
- </remark>
+ <remark role="help-description-end"/>
</listitem>
<listitem>
- <remark>
- description_for_help_topic DAYNAME
- </remark>
+ <remark role="help-topic" condition="DAYNAME"/>
+ <remark role="help-syntax-begin"/>
+
<para>
<indexterm type="function">
<primary>DAYNAME()</primary>
@@ -6695,18 +6795,18 @@
<literal>DAYNAME(<replaceable>date</replaceable>)</literal>
</para>
+ <remark role="help-syntax-end"/>
+
+ <remark role="help-description-begin"/>
+
<para>
Returns the name of the weekday for
<replaceable>date</replaceable>.
</para>
- <remark>
- end_description_for_help_topic
- </remark>
+ <remark role="help-description-end"/>
- <remark>
- example_for_help_topic DAYNAME
- </remark>
+ <remark role="help-example" condition="DAYNAME"/>
<programlisting>
mysql> <userinput>SELECT DAYNAME('1998-02-05');</userinput>
@@ -6715,10 +6815,10 @@
</listitem>
<listitem>
- <remark>
- description_for_help_topic DAYOFMONTH
- </remark>
+ <remark role="help-topic" condition="DAYOFMONTH"/>
+ <remark role="help-syntax-begin"/>
+
<para>
<indexterm type="function">
<primary>DAYOFMONTH()</primary>
@@ -6727,19 +6827,19 @@
<literal>DAYOFMONTH(<replaceable>date</replaceable>)</literal>
</para>
+ <remark role="help-syntax-end"/>
+
+ <remark role="help-description-begin"/>
+
<para>
Returns the day of the month for
<replaceable>date</replaceable>, in the range
<literal>1</literal> to <literal>31</literal>.
</para>
- <remark>
- end_description_for_help_topic
- </remark>
+ <remark role="help-description-end"/>
- <remark>
- example_for_help_topic DAYOFMONTH
- </remark>
+ <remark role="help-example" condition="DAYOFMONTH"/>
<programlisting>
mysql> <userinput>SELECT DAYOFMONTH('1998-02-03');</userinput>
@@ -6748,10 +6848,10 @@
</listitem>
<listitem>
- <remark>
- description_for_help_topic DAYOFWEEK
- </remark>
+ <remark role="help-topic" condition="DAYOFWEEK"/>
+ <remark role="help-syntax-begin"/>
+
<para>
<indexterm type="function">
<primary>DAYOFWEEK()</primary>
@@ -6760,6 +6860,10 @@
<literal>DAYOFWEEK(<replaceable>date</replaceable>)</literal>
</para>
+ <remark role="help-syntax-end"/>
+
+ <remark role="help-description-begin"/>
+
<para>
Returns the weekday index for <replaceable>date</replaceable>
(<literal>1</literal> = Sunday, <literal>2</literal> =
Monday,
@@ -6767,13 +6871,9 @@
correspond to the ODBC standard.
</para>
- <remark>
- end_description_for_help_topic
- </remark>
+ <remark role="help-description-end"/>
- <remark>
- example_for_help_topic DAYOFWEEK
- </remark>
+ <remark role="help-example" condition="DAYOFWEEK"/>
<programlisting>
mysql> <userinput>SELECT DAYOFWEEK('1998-02-03');</userinput>
@@ -6782,10 +6882,10 @@
</listitem>
<listitem>
- <remark>
- description_for_help_topic DAYOFYEAR
- </remark>
+ <remark role="help-topic" condition="DAYOFYEAR"/>
+ <remark role="help-syntax-begin"/>
+
<para>
<indexterm type="function">
<primary>DAYOFYEAR()</primary>
@@ -6794,19 +6894,19 @@
<literal>DAYOFYEAR(<replaceable>date</replaceable>)</literal>
</para>
+ <remark role="help-syntax-end"/>
+
+ <remark role="help-description-begin"/>
+
<para>
Returns the day of the year for
<replaceable>date</replaceable>, in the range
<literal>1</literal> to <literal>366</literal>.
</para>
- <remark>
- end_description_for_help_topic
- </remark>
+ <remark role="help-description-end"/>
- <remark>
- example_for_help_topic DAYOFYEAR
- </remark>
+ <remark role="help-example" condition="DAYOFYEAR"/>
<programlisting>
mysql> <userinput>SELECT DAYOFYEAR('1998-02-03');</userinput>
@@ -6815,10 +6915,10 @@
</listitem>
<listitem>
- <remark>
- description_for_help_topic EXTRACT
- </remark>
+ <remark role="help-topic" condition="EXTRACT"/>
+ <remark role="help-syntax-begin"/>
+
<para>
<indexterm type="function">
<primary>EXTRACT()</primary>
@@ -6828,6 +6928,10 @@
<replaceable>date</replaceable>)</literal>
</para>
+ <remark role="help-syntax-end"/>
+
+ <remark role="help-description-begin"/>
+
<para>
The <literal>EXTRACT()</literal> function uses the same kinds
of interval type specifiers as <literal>DATE_ADD()</literal>
@@ -6835,13 +6939,9 @@
date rather than performing date arithmetic.
</para>
- <remark>
- end_description_for_help_topic
- </remark>
+ <remark role="help-description-end"/>
- <remark>
- example_for_help_topic EXTRACT
- </remark>
+ <remark role="help-example" condition="EXTRACT"/>
<programlisting>
mysql> <userinput>SELECT EXTRACT(YEAR FROM '1999-07-02');</userinput>
@@ -6861,10 +6961,10 @@
</listitem>
<listitem>
- <remark>
- description_for_help_topic FROM_DAYS
- </remark>
+ <remark role="help-topic" condition="FROM_DAYS"/>
+ <remark role="help-syntax-begin"/>
+
<para>
<indexterm type="function">
<primary>FROM_DAYS()</primary>
@@ -6873,18 +6973,18 @@
<literal>FROM_DAYS(<replaceable>N</replaceable>)</literal>
</para>
+ <remark role="help-syntax-end"/>
+
+ <remark role="help-description-begin"/>
+
<para>
Given a daynumber <replaceable>N</replaceable>, returns a
<literal>DATE</literal> value.
</para>
- <remark>
- end_description_for_help_topic
- </remark>
+ <remark role="help-description-end"/>
- <remark>
- example_for_help_topic FROM_DAYS
- </remark>
+ <remark role="help-example" condition="FROM_DAYS"/>
<programlisting>
mysql> <userinput>SELECT FROM_DAYS(729669);</userinput>
@@ -6900,10 +7000,10 @@
</listitem>
<listitem>
- <remark>
- description_for_help_topic FROM_UNIXTIME
- </remark>
+ <remark role="help-topic" condition="FROM_UNIXTIME"/>
+ <remark role="help-syntax-begin"/>
+
<para>
<indexterm type="function">
<primary>FROM_UNIXTIME()</primary>
@@ -6914,6 +7014,10 @@
<literal>FROM_UNIXTIME(<replaceable>unix_timestamp</replaceable>,<replaceable>format</replaceable>)</literal>
</para>
+ <remark role="help-syntax-end"/>
+
+ <remark role="help-description-begin"/>
+
<para>
Returns a representation of the
<replaceable>unix_timestamp</replaceable> argument as a value
@@ -6922,17 +7026,6 @@
the function is used in a string or numeric context.
</para>
- <remark>
- example_for_help_topic FROM_UNIXTIME
- </remark>
-
-<programlisting>
-mysql> <userinput>SELECT FROM_UNIXTIME(875996580);</userinput>
- -> '1997-10-04 22:23:00'
-mysql> <userinput>SELECT FROM_UNIXTIME(875996580) + 0;</userinput>
- -> 19971004222300
-</programlisting>
-
<para>
If <replaceable>format</replaceable> is given, the result is
formatted according to the <replaceable>format</replaceable>
@@ -6941,15 +7034,20 @@
<literal>DATE_FORMAT()</literal> function.
</para>
- <remark>
- end_description_for_help_topic
- </remark>
+ <remark role="help-description-end"/>
- <remark>
- example_for_help_topic FROM_UNIXTIME
- </remark>
+ <remark role="help-example" condition="FROM_UNIXTIME"/>
<programlisting>
+mysql> <userinput>SELECT FROM_UNIXTIME(875996580);</userinput>
+ -> '1997-10-04 22:23:00'
+mysql> <userinput>SELECT FROM_UNIXTIME(875996580) + 0;</userinput>
+ -> 19971004222300
+</programlisting>
+
+ <remark role="help-example" condition="FROM_UNIXTIME"/>
+
+<programlisting>
mysql> <userinput>SELECT FROM_UNIXTIME(UNIX_TIMESTAMP(),</userinput>
-> <userinput>'%Y %D %M %h:%i:%s
%x');</userinput>
-> '2003 6th August 06:22:58 2003'
@@ -6957,10 +7055,10 @@
</listitem>
<listitem>
- <remark>
- description_for_help_topic GET_FORMAT
- </remark>
+ <remark role="help-topic" condition="GET_FORMAT"/>
+ <remark role="help-syntax-begin"/>
+
<para>
<indexterm type="function">
<primary>GET_FORMAT()</primary>
@@ -6970,12 +7068,18 @@
'EUR'|'USA'|'JIS'|'ISO'|'INTERNAL')</literal>
</para>
+ <remark role="help-syntax-end"/>
+
+ <remark role="help-description-begin"/>
+
<para>
Returns a format string. This function is useful in
combination with the <literal>DATE_FORMAT()</literal> and the
<literal>STR_TO_DATE()</literal> functions.
</para>
+ <remark role="help-description-end"/>
+
<remark>
Following is commented out because not yet implemented: and
when setting the server variables @code{DATE_FORMAT},
@@ -7079,14 +7183,8 @@
function returns @code{NULL}.
</remark>
- <remark>
- end_description_for_help_topic
- </remark>
+ <remark role="help-example" condition="GET_FORMAT"/>
- <remark>
- example_for_help_topic GET_FORMAT
- </remark>
-
<programlisting>
mysql> <userinput>SELECT
DATE_FORMAT('2003-10-03',GET_FORMAT(DATE,'EUR'));</userinput>
-> '03.10.2003'
@@ -7111,10 +7209,10 @@
</listitem>
<listitem>
- <remark>
- description_for_help_topic HOUR
- </remark>
+ <remark role="help-topic" condition="HOUR"/>
+ <remark role="help-syntax-begin"/>
+
<para>
<indexterm type="function">
<primary>HOUR()</primary>
@@ -7123,19 +7221,19 @@
<literal>HOUR(<replaceable>time</replaceable>)</literal>
</para>
+ <remark role="help-syntax-end"/>
+
+ <remark role="help-description-begin"/>
+
<para>
Returns the hour for <replaceable>time</replaceable>. The
range of the return value is <literal>0</literal> to
<literal>23</literal> for time-of-day values.
</para>
- <remark>
- end_description_for_help_topic
- </remark>
+ <remark role="help-description-end"/>
- <remark>
- example_for_help_topic HOUR
- </remark>
+ <remark role="help-example" condition="HOUR"/>
<programlisting>
mysql> <userinput>SELECT HOUR('10:05:03');</userinput>
@@ -7155,10 +7253,10 @@
</listitem>
<listitem>
- <remark>
- description_for_help_topic LAST_DAY
- </remark>
+ <remark role="help-topic" condition="LAST_DAY"/>
+ <remark role="help-syntax-begin"/>
+
<para>
<indexterm type="function">
<primary>LAST_DAY()</primary>
@@ -7167,19 +7265,19 @@
<literal>LAST_DAY(<replaceable>date</replaceable>)</literal>
</para>
+ <remark role="help-syntax-end"/>
+
+ <remark role="help-description-begin"/>
+
<para>
Takes a date or datetime value and returns the corresponding
value for the last day of the month. Returns
<literal>NULL</literal> if the argument is invalid.
</para>
- <remark>
- end_description_for_help_topic
- </remark>
+ <remark role="help-description-end"/>
- <remark>
- example_for_help_topic LAST_DAY
- </remark>
+ <remark role="help-example" condition="LAST_DAY"/>
<programlisting>
mysql> <userinput>SELECT LAST_DAY('2003-02-05');</userinput>
@@ -7198,27 +7296,29 @@
</listitem>
<listitem>
- <remark>
- description_for_help_topic LOCALTIME
- </remark>
+ <remark role="help-topic" condition="LOCALTIME"/>
+ <remark role="help-syntax-begin"/>
+
<para>
<indexterm type="function">
<primary>LOCALTIME</primary>
</indexterm>
- <literal>LOCALTIME</literal>,
<literal>LOCALTIME()</literal>
+ <literal>LOCALTIME</literal>
<literal>LOCALTIME()</literal>
</para>
+ <remark role="help-syntax-end"/>
+
+ <remark role="help-description-begin"/>
+
<para>
<literal>LOCALTIME</literal> and
<literal>LOCALTIME()</literal> are synonyms for
<literal>NOW()</literal>.
</para>
- <remark>
- end_description_for_help_topic
- </remark>
+ <remark role="help-description-end"/>
<para>
They were added in MySQL 4.0.6.
@@ -7226,28 +7326,30 @@
</listitem>
<listitem>
- <remark>
- description_for_help_topic LOCALTIMESTAMP
- </remark>
+ <remark role="help-topic" condition="LOCALTIMESTAMP"/>
+ <remark role="help-syntax-begin"/>
+
<para>
<indexterm type="function">
<primary>LOCALTIMESTAMP</primary>
</indexterm>
- <literal>LOCALTIMESTAMP</literal>,
+ <literal>LOCALTIMESTAMP</literal>
<literal>LOCALTIMESTAMP()</literal>
</para>
+ <remark role="help-syntax-end"/>
+
+ <remark role="help-description-begin"/>
+
<para>
<literal>LOCALTIMESTAMP</literal> and
<literal>LOCALTIMESTAMP()</literal> are synonyms for
<literal>NOW()</literal>.
</para>
- <remark>
- end_description_for_help_topic
- </remark>
+ <remark role="help-description-end"/>
<para>
They were added in MySQL 4.0.6.
@@ -7255,10 +7357,10 @@
</listitem>
<listitem>
- <remark>
- description_for_help_topic MAKEDATE
- </remark>
+ <remark role="help-topic" condition="MAKEDATE"/>
+ <remark role="help-syntax-begin"/>
+
<para>
<indexterm type="function">
<primary>MAKEDATE()</primary>
@@ -7267,19 +7369,19 @@
<literal>MAKEDATE(<replaceable>year</replaceable>,<replaceable>dayofyear</replaceable>)</literal>
</para>
+ <remark role="help-syntax-end"/>
+
+ <remark role="help-description-begin"/>
+
<para>
Returns a date, given year and day-of-year values.
<replaceable>dayofyear</replaceable> must be greater than 0 or
the result is <literal>NULL</literal>.
</para>
- <remark>
- end_description_for_help_topic
- </remark>
+ <remark role="help-description-end"/>
- <remark>
- example_for_help_topic MAKEDATE
- </remark>
+ <remark role="help-example" condition="MAKEDATE"/>
<programlisting>
mysql> <userinput>SELECT MAKEDATE(2001,31),
MAKEDATE(2001,32);</userinput>
@@ -7296,10 +7398,10 @@
</listitem>
<listitem>
- <remark>
- description_for_help_topic MAKETIME
- </remark>
+ <remark role="help-topic" condition="MAKETIME"/>
+ <remark role="help-syntax-begin"/>
+
<para>
<indexterm type="function">
<primary>MAKETIME()</primary>
@@ -7308,6 +7410,10 @@
<literal>MAKETIME(<replaceable>hour</replaceable>,<replaceable>minute</replaceable>,<replaceable>second</replaceable>)</literal>
</para>
+ <remark role="help-syntax-end"/>
+
+ <remark role="help-description-begin"/>
+
<para>
Returns a time value calculated from the
<replaceable>hour</replaceable>,
@@ -7315,13 +7421,9 @@
<replaceable>second</replaceable> arguments.
</para>
- <remark>
- end_description_for_help_topic
- </remark>
+ <remark role="help-description-end"/>
- <remark>
- example_for_help_topic MAKETIME
- </remark>
+ <remark role="help-example" condition="MAKETIME"/>
<programlisting>
mysql> <userinput>SELECT MAKETIME(12,15,30);</userinput>
@@ -7334,10 +7436,10 @@
</listitem>
<listitem>
- <remark>
- description_for_help_topic MICROSECOND
- </remark>
+ <remark role="help-topic" condition="MICROSECOND"/>
+ <remark role="help-syntax-begin"/>
+
<para>
<indexterm type="function">
<primary>MICROSECOND()</primary>
@@ -7346,19 +7448,19 @@
<literal>MICROSECOND(<replaceable>expr</replaceable>)</literal>
</para>
+ <remark role="help-syntax-end"/>
+
+ <remark role="help-description-begin"/>
+
<para>
Returns the microseconds from the time or datetime expression
<replaceable>expr</replaceable> as a number in the range from
<literal>0</literal> to <literal>999999</literal>.
</para>
- <remark>
- end_description_for_help_topic
- </remark>
+ <remark role="help-description-end"/>
- <remark>
- example_for_help_topic MICROSECOND
- </remark>
+ <remark role="help-example" condition="MICROSECOND"/>
<programlisting>
mysql> <userinput>SELECT MICROSECOND('12:00:00.123456');</userinput>
@@ -7374,10 +7476,10 @@
</listitem>
<listitem>
- <remark>
- description_for_help_topic MINUTE
- </remark>
+ <remark role="help-topic" condition="MINUTE"/>
+ <remark role="help-syntax-begin"/>
+
<para>
<indexterm type="function">
<primary>MINUTE()</primary>
@@ -7386,18 +7488,18 @@
<literal>MINUTE(<replaceable>time</replaceable>)</literal>
</para>
+ <remark role="help-syntax-end"/>
+
+ <remark role="help-description-begin"/>
+
<para>
Returns the minute for <replaceable>time</replaceable>, in the
range <literal>0</literal> to <literal>59</literal>.
</para>
- <remark>
- end_description_for_help_topic
- </remark>
+ <remark role="help-description-end"/>
- <remark>
- example_for_help_topic MINUTE
- </remark>
+ <remark role="help-example" condition="MINUTE"/>
<programlisting>
mysql> <userinput>SELECT MINUTE('98-02-03 10:05:03');</userinput>
@@ -7406,10 +7508,10 @@
</listitem>
<listitem>
- <remark>
- description_for_help_topic MONTH
- </remark>
+ <remark role="help-topic" condition="MONTH"/>
+ <remark role="help-syntax-begin"/>
+
<para>
<indexterm type="function">
<primary>MONTH()</primary>
@@ -7418,18 +7520,18 @@
<literal>MONTH(<replaceable>date</replaceable>)</literal>
</para>
+ <remark role="help-syntax-end"/>
+
+ <remark role="help-description-begin"/>
+
<para>
Returns the month for <replaceable>date</replaceable>, in the
range <literal>1</literal> to <literal>12</literal>.
</para>
- <remark>
- end_description_for_help_topic
- </remark>
+ <remark role="help-description-end"/>
- <remark>
- example_for_help_topic MONTH
- </remark>
+ <remark role="help-example" condition="MONTH"/>
<programlisting>
mysql> <userinput>SELECT MONTH('1998-02-03');</userinput>
@@ -7438,10 +7540,10 @@
</listitem>
<listitem>
- <remark>
- description_for_help_topic MONTHNAME
- </remark>
+ <remark role="help-topic" condition="MONTHNAME"/>
+ <remark role="help-syntax-begin"/>
+
<para>
<indexterm type="function">
<primary>MONTHNAME()</primary>
@@ -7450,18 +7552,18 @@
<literal>MONTHNAME(<replaceable>date</replaceable>)</literal>
</para>
+ <remark role="help-syntax-end"/>
+
+ <remark role="help-description-begin"/>
+
<para>
Returns the full name of the month for
<replaceable>date</replaceable>.
</para>
- <remark>
- end_description_for_help_topic
- </remark>
+ <remark role="help-description-end"/>
- <remark>
- example_for_help_topic MONTHNAME
- </remark>
+ <remark role="help-example" condition="MONTHNAME"/>
<programlisting>
mysql> <userinput>SELECT MONTHNAME('1998-02-05');</userinput>
@@ -7470,10 +7572,10 @@
</listitem>
<listitem>
- <remark>
- description_for_help_topic NOW
- </remark>
+ <remark role="help-topic" condition="NOW"/>
+ <remark role="help-syntax-begin"/>
+
<para>
<indexterm type="function">
<primary>NOW()</primary>
@@ -7482,6 +7584,10 @@
<literal>NOW()</literal>
</para>
+ <remark role="help-syntax-end"/>
+
+ <remark role="help-description-begin"/>
+
<para>
Returns the current date and time as a value in
<literal>'YYYY-MM-DD HH:MM:SS'</literal> or
@@ -7489,13 +7595,9 @@
the function is used in a string or numeric context.
</para>
- <remark>
- end_description_for_help_topic
- </remark>
+ <remark role="help-description-end"/>
- <remark>
- example_for_help_topic NOW
- </remark>
+ <remark role="help-example" condition="NOW"/>
<programlisting>
mysql> <userinput>SELECT NOW();</userinput>
@@ -7506,10 +7608,10 @@
</listitem>
<listitem>
- <remark>
- description_for_help_topic PERIOD_ADD
- </remark>
+ <remark role="help-topic" condition="PERIOD_ADD"/>
+ <remark role="help-syntax-begin"/>
+
<para>
<indexterm type="function">
<primary>PERIOD_ADD()</primary>
@@ -7518,6 +7620,10 @@
<literal>PERIOD_ADD(<replaceable>P</replaceable>,<replaceable>N</replaceable>)</literal>
</para>
+ <remark role="help-syntax-end"/>
+
+ <remark role="help-description-begin"/>
+
<para>
Adds <replaceable>N</replaceable> months to period
<replaceable>P</replaceable> (in the format
@@ -7527,13 +7633,9 @@
<emphasis>not</emphasis> a date value.
</para>
- <remark>
- end_description_for_help_topic
- </remark>
+ <remark role="help-description-end"/>
- <remark>
- example_for_help_topic PERIOD_ADD
- </remark>
+ <remark role="help-example" condition="PERIOD_ADD"/>
<programlisting>
mysql> <userinput>SELECT PERIOD_ADD(9801,2);</userinput>
@@ -7542,10 +7644,10 @@
</listitem>
<listitem>
- <remark>
- description_for_help_topic PERIOD_DIFF
- </remark>
+ <remark role="help-topic" condition="PERIOD_DIFF"/>
+ <remark role="help-syntax-begin"/>
+
<para>
<indexterm type="function">
<primary>PERIOD_DIFF()</primary>
@@ -7554,6 +7656,10 @@
<literal>PERIOD_DIFF(<replaceable>P1</replaceable>,<replaceable>P2</replaceable>)</literal>
</para>
+ <remark role="help-syntax-end"/>
+
+ <remark role="help-description-begin"/>
+
<para>
Returns the number of months between periods
<replaceable>P1</replaceable> and
@@ -7565,13 +7671,9 @@
date values.
</para>
- <remark>
- end_description_for_help_topic
- </remark>
+ <remark role="help-description-end"/>
- <remark>
- example_for_help_topic PERIOD_DIFF
- </remark>
+ <remark role="help-example" condition="PERIOD_DIFF"/>
<programlisting>
mysql> <userinput>SELECT PERIOD_DIFF(9802,199703);</userinput>
@@ -7580,10 +7682,10 @@
</listitem>
<listitem>
- <remark>
- description_for_help_topic QUARTER
- </remark>
+ <remark role="help-topic" condition="QUARTER"/>
+ <remark role="help-syntax-begin"/>
+
<para>
<indexterm type="function">
<primary>QUARTER()</primary>
@@ -7592,19 +7694,19 @@
<literal>QUARTER(<replaceable>date</replaceable>)</literal>
</para>
+ <remark role="help-syntax-end"/>
+
+ <remark role="help-description-begin"/>
+
<para>
Returns the quarter of the year for
<replaceable>date</replaceable>, in the range
<literal>1</literal> to <literal>4</literal>.
</para>
- <remark>
- end_description_for_help_topic
- </remark>
+ <remark role="help-description-end"/>
- <remark>
- example_for_help_topic QUARTER
- </remark>
+ <remark role="help-example" condition="QUARTER"/>
<programlisting>
mysql> <userinput>SELECT QUARTER('98-04-01');</userinput>
@@ -7613,10 +7715,10 @@
</listitem>
<listitem>
- <remark>
- description_for_help_topic SECOND
- </remark>
+ <remark role="help-topic" condition="SECOND"/>
+ <remark role="help-syntax-begin"/>
+
<para>
<indexterm type="function">
<primary>SECOND()</primary>
@@ -7625,18 +7727,18 @@
<literal>SECOND(<replaceable>time</replaceable>)</literal>
</para>
+ <remark role="help-syntax-end"/>
+
+ <remark role="help-description-begin"/>
+
<para>
Returns the second for <replaceable>time</replaceable>, in the
range <literal>0</literal> to <literal>59</literal>.
</para>
- <remark>
- end_description_for_help_topic
- </remark>
+ <remark role="help-description-end"/>
- <remark>
- example_for_help_topic SECOND
- </remark>
+ <remark role="help-example" condition="SECOND"/>
<programlisting>
mysql> <userinput>SELECT SECOND('10:05:03');</userinput>
@@ -7645,10 +7747,10 @@
</listitem>
<listitem>
- <remark>
- description_for_help_topic SEC_TO_TIME
- </remark>
+ <remark role="help-topic" condition="SEC_TO_TIME"/>
+ <remark role="help-syntax-begin"/>
+
<para>
<indexterm type="function">
<primary>SEC_TO_TIME()</primary>
@@ -7657,6 +7759,10 @@
<literal>SEC_TO_TIME(<replaceable>seconds</replaceable>)</literal>
</para>
+ <remark role="help-syntax-end"/>
+
+ <remark role="help-description-begin"/>
+
<para>
Returns the <replaceable>seconds</replaceable> argument,
converted to hours, minutes, and seconds, as a value in
@@ -7665,13 +7771,9 @@
or numeric context.
</para>
- <remark>
- end_description_for_help_topic
- </remark>
+ <remark role="help-description-end"/>
- <remark>
- example_for_help_topic SEC_TO_TIME
- </remark>
+ <remark role="help-example" condition="SEC_TO_TIME"/>
<programlisting>
mysql> <userinput>SELECT SEC_TO_TIME(2378);</userinput>
@@ -7686,10 +7788,10 @@
</listitem>
<listitem>
- <remark>
- description_for_help_topic STR_TO_DATE
- </remark>
+ <remark role="help-topic" condition="STR_TO_DATE"/>
+ <remark role="help-syntax-begin"/>
+
<para>
<indexterm type="function">
<primary>STR_TO_DATE()</primary>
@@ -7698,6 +7800,10 @@
<literal>STR_TO_DATE(<replaceable>str</replaceable>,<replaceable>format</replaceable>)</literal>
</para>
+ <remark role="help-syntax-end"/>
+
+ <remark role="help-description-begin"/>
+
<para>
This is the reverse function of the
<literal>DATE_FORMAT()</literal> function. It takes a string
@@ -7736,13 +7842,9 @@
<literal>NULL</literal>.
</para>
- <remark>
- end_description_for_help_topic
- </remark>
+ <remark role="help-description-end"/>
- <remark>
- example_for_help_topic STR_TO_DATE
- </remark>
+ <remark role="help-example" condition="STR_TO_DATE"/>
<programlisting>
<remark>next example commented out until format string becomes
optional</remark>
@@ -7783,10 +7885,10 @@
</listitem>
<listitem>
- <remark>
- description_for_help_topic SUBDATE
- </remark>
+ <remark role="help-topic" condition="SUBDATE"/>
+ <remark role="help-syntax-begin"/>
+
<para>
<indexterm type="function">
<primary>SUBDATE()</primary>
@@ -7794,10 +7896,14 @@
<literal>SUBDATE(<replaceable>date</replaceable>,INTERVAL
<replaceable>expr</replaceable>
- <replaceable>type</replaceable>)</literal>,
+ <replaceable>type</replaceable>)</literal>
<literal>SUBDATE(<replaceable>expr</replaceable>,<replaceable>days</replaceable>)</literal>
</para>
+ <remark role="help-syntax-end"/>
+
+ <remark role="help-description-begin"/>
+
<para>
When invoked with the <literal>INTERVAL</literal> form of the
second argument, <literal>SUBDATE()</literal> is a synonym for
@@ -7839,16 +7945,14 @@
-> 2004-10-18
</programlisting>
- <remark>
- end_description_for_help_topic
- </remark>
+ <remark role="help-description-end"/>
</listitem>
<listitem>
- <remark>
- description_for_help_topic SUBTIME
- </remark>
+ <remark role="help-topic" condition="SUBTIME"/>
+ <remark role="help-syntax-begin"/>
+
<para>
<indexterm type="function">
<primary>SUBTIME()</primary>
@@ -7857,10 +7961,14 @@
<literal>SUBTIME(<replaceable>expr</replaceable>,<replaceable>expr2</replaceable>)</literal>
</para>
+ <remark role="help-syntax-end"/>
+
<remark role="todo">
DESCRIPTION. Depends on SAP/MySQL mode.
</remark>
+ <remark role="help-description-begin"/>
+
<para>
<literal>SUBTIME()</literal> subtracts
<replaceable>expr2</replaceable> from
@@ -7870,13 +7978,9 @@
expression.
</para>
- <remark>
- end_description_for_help_topic
- </remark>
+ <remark role="help-description-end"/>
- <remark>
- example_for_help_topic SUBTIME
- </remark>
+ <remark role="help-example" condition="SUBTIME"/>
<programlisting>
mysql> <userinput>SELECT SUBTIME('1997-12-31
23:59:59.999999',</userinput>
@@ -7892,10 +7996,10 @@
</listitem>
<listitem>
- <remark>
- description_for_help_topic SYSDATE
- </remark>
+ <remark role="help-topic" condition="SYSDATE"/>
+ <remark role="help-syntax-begin"/>
+
<para>
<indexterm type="function">
<primary>SYSDATE()</primary>
@@ -7904,6 +8008,10 @@
<literal>SYSDATE()</literal>
</para>
+ <remark role="help-syntax-end"/>
+
+ <remark role="help-description-begin"/>
+
<para>
Returns the current date and time as a value in
<literal>'YYYY-MM-DD HH:MM:SS'</literal> or
@@ -7911,16 +8019,18 @@
the function is used in a string or numeric context.
</para>
- <remark>
- end_description_for_help_topic
- </remark>
+ <remark role="help-description-end"/>
</listitem>
<listitem>
- <remark>
- description_for_help_topic TIME function TIME
+ <remark role="help-topic" condition="TIME function"/>
+
+ <remark role="help-keywords">
+ TIME
</remark>
+ <remark role="help-syntax-begin"/>
+
<para>
<indexterm type="function">
<primary>TIME()</primary>
@@ -7929,18 +8039,18 @@
<literal>TIME(<replaceable>expr</replaceable>)</literal>
</para>
+ <remark role="help-syntax-end"/>
+
+ <remark role="help-description-begin"/>
+
<para>
Extracts the time part of the time or datetime expression
<replaceable>expr</replaceable>.
</para>
- <remark>
- end_description_for_help_topic
- </remark>
+ <remark role="help-description-end"/>
- <remark>
- example_for_help_topic TIME function
- </remark>
+ <remark role="help-example" condition="TIME function"/>
<programlisting>
mysql> <userinput>SELECT TIME('2003-12-31 01:02:03');</userinput>
@@ -7955,10 +8065,10 @@
</listitem>
<listitem>
- <remark>
- description_for_help_topic TIMEDIFF
- </remark>
+ <remark role="help-topic" condition="TIMEDIFF"/>
+ <remark role="help-syntax-begin"/>
+
<para>
<indexterm type="function">
<primary>TIMEDIFF()</primary>
@@ -7967,10 +8077,14 @@
<literal>TIMEDIFF(<replaceable>expr</replaceable>,<replaceable>expr2</replaceable>)</literal>
</para>
+ <remark role="help-syntax-end"/>
+
<remark role="todo">
DESCRIPTION. Depends on SAP/MySQL mode.
</remark>
+ <remark role="help-description-begin"/>
+
<para>
<literal>TIMEDIFF()</literal> returns the time between the
start time <replaceable>expr</replaceable> and the end time
@@ -7980,13 +8094,9 @@
expressions, but both must be of the same type.
</para>
- <remark>
- end_description_for_help_topic
- </remark>
+ <remark role="help-description-end"/>
- <remark>
- example_for_help_topic TIMEDIFF
- </remark>
+ <remark role="help-example" condition="TIMEDIFF"/>
<programlisting>
mysql> <userinput>SELECT TIMEDIFF('2000:01:01 00:00:00',</userinput>
@@ -8003,10 +8113,14 @@
</listitem>
<listitem>
- <remark>
- description_for_help_topic TIMESTAMP function TIMESTAMP
+ <remark role="help-topic" condition="TIMESTAMP function"/>
+
+ <remark role="help-keywords">
+ TIMESTAMP
</remark>
+ <remark role="help-syntax-begin"/>
+
<para>
<indexterm type="function">
<primary>TIMESTAMP()</primary>
@@ -8017,6 +8131,10 @@
<literal>TIMESTAMP(<replaceable>expr</replaceable>,<replaceable>expr2</replaceable>)</literal>
</para>
+ <remark role="help-syntax-end"/>
+
+ <remark role="help-description-begin"/>
+
<para>
With one argument, returns the date or datetime expression
<replaceable>expr</replaceable> as a datetime value. With two
@@ -8026,13 +8144,9 @@
datetime value.
</para>
- <remark>
- end_description_for_help_topic
- </remark>
+ <remark role="help-description-end"/>
- <remark>
- example_for_help_topic TIMESTAMP function
- </remark>
+ <remark role="help-example" condition="TIMESTAMP function"/>
<programlisting>
mysql> <userinput>SELECT TIMESTAMP('2003-12-31');</userinput>
@@ -8047,10 +8161,10 @@
</listitem>
<listitem>
- <remark>
- description_for_help_topic TIME_FORMAT
- </remark>
+ <remark role="help-topic" condition="TIME_FORMAT"/>
+ <remark role="help-syntax-begin"/>
+
<para>
<indexterm type="function">
<primary>TIME_FORMAT()</primary>
@@ -8059,6 +8173,10 @@
<literal>TIME_FORMAT(<replaceable>time</replaceable>,<replaceable>format</replaceable>)</literal>
</para>
+ <remark role="help-syntax-end"/>
+
+ <remark role="help-description-begin"/>
+
<para>
This is used like the <literal>DATE_FORMAT()</literal>
function, but the <replaceable>format</replaceable> string may
@@ -8067,9 +8185,7 @@
<literal>NULL</literal> value or <literal>0</literal>.
</para>
- <remark>
- end_description_for_help_topic
- </remark>
+ <remark role="help-description-end"/>
<para>
If the <replaceable>time</replaceable> value contains an hour
@@ -8080,6 +8196,8 @@
produce the hour value modulo 12.
</para>
+ <remark role="help-example" condition="TIME_FORMAT"/>
+
<programlisting>
mysql> <userinput>SELECT TIME_FORMAT('100:00:00', '%H %k %h %I
%l');</userinput>
-> '100 100 04 04 4'
@@ -8087,10 +8205,10 @@
</listitem>
<listitem>
- <remark>
- description_for_help_topic TIME_TO_SEC
- </remark>
+ <remark role="help-topic" condition="TIME_TO_SEC"/>
+ <remark role="help-syntax-begin"/>
+
<para>
<indexterm type="function">
<primary>TIME_TO_SEC()</primary>
@@ -8099,18 +8217,18 @@
<literal>TIME_TO_SEC(<replaceable>time</replaceable>)</literal>
</para>
+ <remark role="help-syntax-end"/>
+
+ <remark role="help-description-begin"/>
+
<para>
Returns the <replaceable>time</replaceable> argument,
converted to seconds.
</para>
- <remark>
- end_description_for_help_topic
- </remark>
+ <remark role="help-description-end"/>
- <remark>
- example_for_help_topic TIME_TO_SEC
- </remark>
+ <remark role="help-example" condition="TIME_TO_SEC"/>
<programlisting>
mysql> <userinput>SELECT TIME_TO_SEC('22:23:00');</userinput>
@@ -8121,10 +8239,10 @@
</listitem>
<listitem>
- <remark>
- description_for_help_topic TO_DAYS
- </remark>
+ <remark role="help-topic" condition="TO_DAYS"/>
+ <remark role="help-syntax-begin"/>
+
<para>
<indexterm type="function">
<primary>TO_DAYS()</primary>
@@ -8133,18 +8251,18 @@
<literal>TO_DAYS(<replaceable>date</replaceable>)</literal>
</para>
+ <remark role="help-syntax-end"/>
+
+ <remark role="help-description-begin"/>
+
<para>
Given a date <replaceable>date</replaceable>, returns a
daynumber (the number of days since year 0).
</para>
- <remark>
- end_description_for_help_topic
- </remark>
+ <remark role="help-description-end"/>
- <remark>
- example_for_help_topic TO_DAYS
- </remark>
+ <remark role="help-example" condition="TO_DAYS"/>
<programlisting>
mysql> <userinput>SELECT TO_DAYS(950501);</userinput>
@@ -8180,10 +8298,10 @@
</listitem>
<listitem>
- <remark>
- description_for_help_topic UNIX_TIMESTAMP
- </remark>
+ <remark role="help-topic" condition="UNIX_TIMESTAMP"/>
+ <remark role="help-syntax-begin"/>
+
<para>
<indexterm type="function">
<primary>UNIX_TIMESTAMP()</primary>
@@ -8193,6 +8311,10 @@
<literal>UNIX_TIMESTAMP(<replaceable>date</replaceable>)</literal>
</para>
+ <remark role="help-syntax-end"/>
+
+ <remark role="help-description-begin"/>
+
<para>
If called with no argument, returns a Unix timestamp (seconds
since <literal>'1970-01-01 00:00:00'</literal> GMT) as an
@@ -8207,13 +8329,9 @@
<literal>YYYYMMDD</literal> in local time.
</para>
- <remark>
- end_description_for_help_topic
- </remark>
+ <remark role="help-description-end"/>
- <remark>
- example_for_help_topic UNIX_TIMESTAMP
- </remark>
+ <remark role="help-example" condition="UNIX_TIMESTAMP"/>
<programlisting>
mysql> <userinput>SELECT UNIX_TIMESTAMP();</userinput>
@@ -8244,10 +8362,10 @@
</listitem>
<listitem>
- <remark>
- description_for_help_topic UTC_DATE
- </remark>
+ <remark role="help-topic" condition="UTC_DATE"/>
+ <remark role="help-syntax-begin"/>
+
<para>
<indexterm type="function">
<primary>UTC_DATE()</primary>
@@ -8256,6 +8374,10 @@
<literal>UTC_DATE</literal>,
<literal>UTC_DATE()</literal>
</para>
+ <remark role="help-syntax-end"/>
+
+ <remark role="help-description-begin"/>
+
<para>
Returns the current UTC date as a value in
<literal>'YYYY-MM-DD'</literal> or
<literal>YYYYMMDD</literal>
@@ -8263,13 +8385,9 @@
or numeric context.
</para>
- <remark>
- end_description_for_help_topic
- </remark>
+ <remark role="help-description-end"/>
- <remark>
- example_for_help_topic UTC_DATE
- </remark>
+ <remark role="help-example" condition="UTC_DATE"/>
<programlisting>
mysql> <userinput>SELECT UTC_DATE(), UTC_DATE() + 0;</userinput>
@@ -8282,10 +8400,10 @@
</listitem>
<listitem>
- <remark>
- description_for_help_topic UTC_TIME
- </remark>
+ <remark role="help-topic" condition="UTC_TIME"/>
+ <remark role="help-syntax-begin"/>
+
<para>
<indexterm type="function">
<primary>UTC_TIME()</primary>
@@ -8294,6 +8412,10 @@
<literal>UTC_TIME</literal>,
<literal>UTC_TIME()</literal>
</para>
+ <remark role="help-syntax-end"/>
+
+ <remark role="help-description-begin"/>
+
<para>
Returns the current UTC time as a value in
<literal>'HH:MM:SS'</literal> or
<literal>HHMMSS</literal>
@@ -8301,13 +8423,9 @@
or numeric context.
</para>
- <remark>
- end_description_for_help_topic
- </remark>
+ <remark role="help-description-end"/>
- <remark>
- example_for_help_topic UTC_TIME
- </remark>
+ <remark role="help-example" condition="UTC_TIME"/>
<programlisting>
mysql> <userinput>SELECT UTC_TIME(), UTC_TIME() + 0;</userinput>
@@ -8320,10 +8438,10 @@
</listitem>
<listitem>
- <remark>
- description_for_help_topic UTC_TIMESTAMP
- </remark>
+ <remark role="help-topic" condition="UTC_TIMESTAMP"/>
+ <remark role="help-syntax-begin"/>
+
<para>
<indexterm type="function">
<primary>UTC_TIMESTAMP()</primary>
@@ -8333,6 +8451,10 @@
<literal>UTC_TIMESTAMP()</literal>
</para>
+ <remark role="help-syntax-end"/>
+
+ <remark role="help-description-begin"/>
+
<para>
Returns the current UTC date and time as a value in
<literal>'YYYY-MM-DD HH:MM:SS'</literal> or
@@ -8340,13 +8462,9 @@
the function is used in a string or numeric context.
</para>
- <remark>
- end_description_for_help_topic
- </remark>
+ <remark role="help-description-end"/>
- <remark>
- example_for_help_topic UTC_TIMESTAMP
- </remark>
+ <remark role="help-example" condition="UTC_TIMESTAMP"/>
<programlisting>
mysql> <userinput>SELECT UTC_TIMESTAMP(), UTC_TIMESTAMP() +
0;</userinput>
@@ -8360,10 +8478,10 @@
</listitem>
<listitem>
- <remark>
- description_for_help_topic WEEK
- </remark>
+ <remark role="help-topic" condition="WEEK"/>
+ <remark role="help-syntax-begin"/>
+
<para>
<indexterm type="function">
<primary>WEEK()</primary>
@@ -8372,6 +8490,10 @@
<literal>WEEK(<replaceable>date</replaceable>[,<replaceable>mode</replaceable>])</literal>
</para>
+ <remark role="help-syntax-end"/>
+
+ <remark role="help-description-begin"/>
+
<para>
The function returns the week number for
<replaceable>date</replaceable>. The two-argument form of
@@ -8386,6 +8508,8 @@
<xref linkend="server-system-variables"/>.
</para>
+ <remark role="help-description-end"/>
+
<para>
The following table describes how the
<replaceable>mode</replaceable> argument works:
@@ -8468,14 +8592,8 @@
<literal>4</literal> and above can be used as of MySQL 4.0.17.
</para>
- <remark>
- end_description_for_help_topic
- </remark>
+ <remark role="help-example" condition="WEEK"/>
- <remark>
- example_for_help_topic WEEK
- </remark>
-
<programlisting>
mysql> <userinput>SELECT WEEK('1998-02-20');</userinput>
-> 7
@@ -8549,10 +8667,10 @@
</listitem>
<listitem>
- <remark>
- description_for_help_topic WEEKDAY
- </remark>
+ <remark role="help-topic" condition="WEEKDAY"/>
+ <remark role="help-syntax-begin"/>
+
<para>
<indexterm type="function">
<primary>WEEKDAY()</primary>
@@ -8561,19 +8679,19 @@
<literal>WEEKDAY(<replaceable>date</replaceable>)</literal>
</para>
+ <remark role="help-syntax-end"/>
+
+ <remark role="help-description-begin"/>
+
<para>
Returns the weekday index for <replaceable>date</replaceable>
(<literal>0</literal> = Monday, <literal>1</literal> =
Tuesday, ... <literal>6</literal> = Sunday).
</para>
- <remark>
- end_description_for_help_topic
- </remark>
+ <remark role="help-description-end"/>
- <remark>
- example_for_help_topic WEEKDAY
- </remark>
+ <remark role="help-example" condition="WEEKDAY"/>
<programlisting>
mysql> <userinput>SELECT WEEKDAY('1998-02-03 22:23:00');</userinput>
@@ -8584,10 +8702,10 @@
</listitem>
<listitem>
- <remark>
- description_for_help_topic WEEKOFYEAR
- </remark>
+ <remark role="help-topic" condition="WEEKOFYEAR"/>
+ <remark role="help-syntax-begin"/>
+
<para>
<indexterm type="function">
<primary>WEEKOFYEAR()</primary>
@@ -8596,6 +8714,10 @@
<literal>WEEKOFYEAR(<replaceable>date</replaceable>)</literal>
</para>
+ <remark role="help-syntax-end"/>
+
+ <remark role="help-description-begin"/>
+
<para>
Returns the calendar week of the date as a number in the range
from <literal>1</literal> to <literal>53</literal>. It
is a
@@ -8603,13 +8725,9 @@
<literal>WEEK(<replaceable>date</replaceable>,3)</literal>.
</para>
- <remark>
- end_description_for_help_topic
- </remark>
+ <remark role="help-description-end"/>
- <remark>
- example_for_help_topic WEEKOFYEAR
- </remark>
+ <remark role="help-example" condition="WEEKOFYEAR"/>
<programlisting>
mysql> <userinput>SELECT WEEKOFYEAR('1998-02-20');</userinput>
@@ -8623,10 +8741,10 @@
</listitem>
<listitem>
- <remark>
- description_for_help_topic YEAR
- </remark>
+ <remark role="help-topic" condition="YEAR"/>
+ <remark role="help-syntax-begin"/>
+
<para>
<indexterm type="function">
<primary>YEAR()</primary>
@@ -8635,18 +8753,18 @@
<literal>YEAR(<replaceable>date</replaceable>)</literal>
</para>
+ <remark role="help-syntax-end"/>
+
+ <remark role="help-description-begin"/>
+
<para>
Returns the year for <replaceable>date</replaceable>, in the
range <literal>1000</literal> to
<literal>9999</literal>.
</para>
- <remark>
- end_description_for_help_topic
- </remark>
+ <remark role="help-description-end"/>
- <remark>
- example_for_help_topic YEAR
- </remark>
+ <remark role="help-example" condition="YEAR"/>
<programlisting>
mysql> <userinput>SELECT YEAR('98-02-03');</userinput>
@@ -8655,10 +8773,10 @@
</listitem>
<listitem>
- <remark>
- description_for_help_topic YEARWEEK
- </remark>
+ <remark role="help-topic" condition="YEARWEEK"/>
+ <remark role="help-syntax-begin"/>
+
<para>
<indexterm type="function">
<primary>YEARWEEK()</primary>
@@ -8668,6 +8786,10 @@
<literal>YEARWEEK(<replaceable>date</replaceable>,<replaceable>start</replaceable>)</literal>
</para>
+ <remark role="help-syntax-end"/>
+
+ <remark role="help-description-begin"/>
+
<para>
Returns year and week for a date. The
<replaceable>start</replaceable> argument works exactly like
@@ -8677,13 +8799,9 @@
the last week of the year.
</para>
- <remark>
- end_description_for_help_topic
- </remark>
+ <remark role="help-description-end"/>
- <remark>
- example_for_help_topic YEARWEEK
- </remark>
+ <remark role="help-example" condition="YEARWEEK"/>
<programlisting>
mysql> <userinput>SELECT YEARWEEK('1987-01-01');</userinput>
@@ -8813,9 +8931,7 @@
<title id="title-fulltext-search">&title-fulltext-search;</title>
- <remark>
- help_category String Functions@Functions
- </remark>
+ <remark role="help-category" condition="String Functions@Functions"/>
<indexterm>
<primary>searching</primary>
@@ -8833,11 +8949,14 @@
<itemizedlist>
<listitem>
- <remark>
- description_for_help_topic MATCH AGAINST MATCH AGAINST BOOLEAN
- IN MODE MATCH AGAINST QUERY EXPANSION WITH
+ <remark role="help-topic" condition="MATCH AGAINST"/>
+
+ <remark role="help-keywords">
+ MATCH AGAINST BOOLEAN QUERY EXPANSION WITH
</remark>
+ <remark role="help-syntax-begin"/>
+
<para>
<indexterm type="function">
<primary>MATCH ... AGAINST()</primary>
@@ -8849,6 +8968,10 @@
WITH QUERY EXPANSION])</literal>
</para>
+ <remark role="help-syntax-end"/>
+
+ <remark role="help-description-begin"/>
+
<para>
As of MySQL 3.23.23, MySQL has support for full-text indexing
and searching. A full-text index in MySQL is an index of type
@@ -8867,9 +8990,7 @@
slower.
</para>
- <remark>
- end_description_for_help_topic
- </remark>
+ <remark role="help-description-end"/>
<para>
Constraints on full-text searching are listed in
@@ -9005,14 +9126,8 @@
full-text search code only once.
</para>
- <remark>
- help_category String Functions@Functions
- </remark>
+ <remark role="help-example" condition="MATCH AGAINST"/>
- <remark>
- example_for_help_topic MATCH AGAINST
- </remark>
-
<programlisting>
mysql> <userinput>SELECT id, body, MATCH (title,body)
AGAINST</userinput>
-> <userinput>('Security implications of running MySQL as root') AS
score</userinput>
@@ -10634,10 +10749,10 @@
<itemizedlist>
<listitem>
- <remark>
- description_for_help_topic BINARY operator
- </remark>
+ <remark role="help-topic" condition="BINARY"/>
+ <remark role="help-syntax-begin"/>
+
<para>
<indexterm type="function">
<primary>BINARY</primary>
@@ -10646,6 +10761,10 @@
<literal>BINARY</literal>
</para>
+ <remark role="help-syntax-end"/>
+
+ <remark role="help-description-begin"/>
+
<para>
The <literal>BINARY</literal> operator casts the string
following it to a binary string. This is an easy way to force
@@ -10657,13 +10776,9 @@
significant.
</para>
- <remark>
- end_description_for_help_topic
- </remark>
+ <remark role="help-description-end"/>
- <remark>
- example_for_help_topic BINARY operator
- </remark>
+ <remark role="help-example" condition="BINARY"/>
<programlisting>
mysql> <userinput>SELECT 'a' = 'A';</userinput>
@@ -10751,11 +10866,14 @@
</listitem>
<listitem>
- <remark>
- description_for_help_topic CAST CONVERT SIGNED UNSIGNED BINARY
- CHAR DATE DATETIME TIME
+ <remark role="help-topic" condition="CAST"/>
+
+ <remark role="help-keywords">
+ CONVERT SIGNED UNSIGNED BINARY
</remark>
+ <remark role="help-syntax-begin"/>
+
<para>
<indexterm type="function">
<primary>CAST</primary>
@@ -10772,6 +10890,10 @@
<replaceable>transcoding_name</replaceable>)</literal>
</para>
+ <remark role="help-syntax-end"/>
+
+ <remark role="help-description-begin"/>
+
<para>
The <literal>CAST()</literal> and
<literal>CONVERT()</literal>
functions can be used to take a value of one type and produce
@@ -10863,6 +10985,8 @@
<programlisting>
SELECT CONVERT('abc' USING utf8);
</programlisting>
+
+ <remark role="help-description-end"/>
</listitem>
</itemizedlist>
@@ -10873,10 +10997,6 @@
statement:
</para>
- <remark>
- end_description_for_help_topic
- </remark>
-
<programlisting>
CREATE TABLE new_table SELECT CAST('2000-01-01' AS DATE);
</programlisting>
@@ -10889,9 +11009,7 @@
results in a lexical sort:
</para>
- <remark>
- example_for_help_topic CAST
- </remark>
+ <remark role="help-example" condition="CAST"/>
<programlisting>
SELECT <replaceable>enum_col</replaceable> FROM
<replaceable>tbl_name</replaceable> ORDER BY
CAST(<replaceable>enum_col</replaceable> AS CHAR);
@@ -11026,10 +11144,6 @@
<title id="title-other-functions">&title-other-functions;</title>
- <remark>
- help_category Bit Functions@Functions
- </remark>
-
<section id="bit-functions">
<title id="title-bit-functions">&title-bit-functions;</title>
@@ -11048,6 +11162,8 @@
<secondary>bit</secondary>
</indexterm>
+ <remark role="help-category" condition="Bit Functions@Functions"/>
+
<para>
MySQL uses <literal>BIGINT</literal> (64-bit) arithmetic for bit
operations, so these operators have a maximum range of 64 bits.
@@ -11056,10 +11172,10 @@
<itemizedlist>
<listitem>
- <remark>
- description_for_help_topic |
- </remark>
+ <remark role="help-topic" condition="|"/>
+ <remark role="help-syntax-begin"/>
+
<para>
<indexterm type="function">
<primary>| (bitwise OR)</primary>
@@ -11073,17 +11189,17 @@
<literal>|</literal>
</para>
+ <remark role="help-syntax-end"/>
+
+ <remark role="help-description-begin"/>
+
<para>
Bitwise OR:
</para>
- <remark>
- end_description_for_help_topic
- </remark>
+ <remark role="help-description-end"/>
- <remark>
- example_for_help_topic |
- </remark>
+ <remark role="help-example" condition="|"/>
<programlisting>
mysql> <userinput>SELECT 29 | 15;</userinput>
@@ -11096,10 +11212,10 @@
</listitem>
<listitem>
- <remark>
- description_for_help_topic &
- </remark>
+ <remark role="help-topic" condition="&"/>
+ <remark role="help-syntax-begin"/>
+
<para>
<indexterm type="function">
<primary>& (bitwise AND)</primary>
@@ -11113,17 +11229,17 @@
<literal>&</literal>
</para>
+ <remark role="help-syntax-end"/>
+
+ <remark role="help-description-begin"/>
+
<para>
Bitwise AND:
</para>
- <remark>
- end_description_for_help_topic
- </remark>
+ <remark role="help-description-end"/>
- <remark>
- example_for_help_topic &
- </remark>
+ <remark role="help-example" condition="&"/>
<programlisting>
mysql> <userinput>SELECT 29 & 15;</userinput>
@@ -11136,10 +11252,10 @@
</listitem>
<listitem>
- <remark>
- description_for_help_topic ^
- </remark>
+ <remark role="help-topic" condition="^"/>
+ <remark role="help-syntax-begin"/>
+
<para>
<indexterm type="function">
<primary>^ (bitwise XOR)</primary>
@@ -11153,17 +11269,17 @@
<literal>^</literal>
</para>
+ <remark role="help-syntax-end"/>
+
+ <remark role="help-description-begin"/>
+
<para>
Bitwise XOR:
</para>
- <remark>
- end_description_for_help_topic
- </remark>
+ <remark role="help-description-end"/>
- <remark>
- example_for_help_topic ^
- </remark>
+ <remark role="help-example" condition="^"/>
<programlisting>
mysql> <userinput>SELECT 1 ^ 1;</userinput>
@@ -11184,10 +11300,10 @@
</listitem>
<listitem>
- <remark>
- description_for_help_topic <<
- </remark>
+ <remark role="help-topic" condition="<<"/>
+ <remark role="help-syntax-begin"/>
+
<para>
<indexterm type="function">
<primary><< (left shift)</primary>
@@ -11196,18 +11312,18 @@
<literal><<</literal>
</para>
+ <remark role="help-syntax-end"/>
+
+ <remark role="help-description-begin"/>
+
<para>
Shifts a longlong (<literal>BIGINT</literal>) number to the
left.
</para>
- <remark>
- end_description_for_help_topic
- </remark>
+ <remark role="help-description-end"/>
- <remark>
- example_for_help_topic <<
- </remark>
+ <remark role="help-example" condition="<<"/>
<programlisting>
mysql> <userinput>SELECT 1 << 2;</userinput>
@@ -11220,10 +11336,10 @@
</listitem>
<listitem>
- <remark>
- description_for_help_topic >>
- </remark>
+ <remark role="help-topic" condition=">>"/>
+ <remark role="help-syntax-begin"/>
+
<para>
<indexterm type="function">
<primary>>> (right shift)</primary>
@@ -11232,18 +11348,18 @@
<literal>>></literal>
</para>
+ <remark role="help-syntax-end"/>
+
+ <remark role="help-description-begin"/>
+
<para>
Shifts a longlong (<literal>BIGINT</literal>) number to the
right.
</para>
- <remark>
- end_description_for_help_topic
- </remark>
+ <remark role="help-description-end"/>
- <remark>
- example_for_help_topic >>
- </remark>
+ <remark role="help-example" condition=">>"/>
<programlisting>
mysql> <userinput>SELECT 4 >> 2;</userinput>
@@ -11256,10 +11372,10 @@
</listitem>
<listitem>
- <remark>
- description_for_help_topic ~
- </remark>
+ <remark role="help-topic" condition="~"/>
+ <remark role="help-syntax-begin"/>
+
<para>
<indexterm type="function">
<primary>~</primary>
@@ -11268,17 +11384,17 @@
<literal>~</literal>
</para>
+ <remark role="help-syntax-end"/>
+
+ <remark role="help-description-begin"/>
+
<para>
Invert all bits.
</para>
- <remark>
- end_description_for_help_topic
- </remark>
+ <remark role="help-description-end"/>
- <remark>
- example_for_help_topic ~
- </remark>
+ <remark role="help-example" condition="~"/>
<programlisting>
mysql> <userinput>SELECT 5 & ~1;</userinput>
@@ -11291,10 +11407,10 @@
</listitem>
<listitem>
- <remark>
- description_for_help_topic BIT_COUNT
- </remark>
+ <remark role="help-topic" condition="BIT_COUNT"/>
+ <remark role="help-syntax-begin"/>
+
<para>
<indexterm type="function">
<primary>BIT_COUNT()</primary>
@@ -11303,18 +11419,18 @@
<literal>BIT_COUNT(<replaceable>N</replaceable>)</literal>
</para>
+ <remark role="help-syntax-end"/>
+
+ <remark role="help-description-begin"/>
+
<para>
Returns the number of bits that are set in the argument
<replaceable>N</replaceable>.
</para>
- <remark>
- end_description_for_help_topic
- </remark>
+ <remark role="help-description-end"/>
- <remark>
- example_for_help_topic BIT_COUNT
- </remark>
+ <remark role="help-example" condition="BIT_COUNT"/>
<programlisting>
mysql> <userinput>SELECT BIT_COUNT(29);</userinput>
@@ -11339,9 +11455,7 @@
<secondary>encryption</secondary>
</indexterm>
- <remark>
- help_category Encryption Functions@Functions
- </remark>
+ <remark role="help-category" condition="Encryption Functions@Functions"/>
<para>
The functions in this section encrypt and decrypt data values.
@@ -11356,10 +11470,14 @@
<itemizedlist>
<listitem>
- <remark>
- description_for_help_topic AES_DECRYPT AES_ENCRYPT
+ <remark role="help-topic" condition="AES_DECRYPT"/>
+
+ <remark role="help-keywords">
+ AES_ENCRYPT
</remark>
+ <remark role="help-syntax-begin"/>
+
<para>
<indexterm type="function">
<primary>AES_ENCRYPT()</primary>
@@ -11374,6 +11492,10 @@
<literal>AES_DECRYPT(<replaceable>crypt_str</replaceable>,<replaceable>key_str</replaceable>)</literal>
</para>
+ <remark role="help-syntax-end"/>
+
+ <remark role="help-description-begin"/>
+
<para>
These functions allow encryption and decryption of data
using the official AES (Advanced Encryption Standard)
@@ -11409,13 +11531,9 @@
form by modifying your queries:
</para>
- <remark>
- end_description_for_help_topic
- </remark>
+ <remark role="help-description-end"/>
- <remark>
- example_for_help_topic AES_DECRYPT
- </remark>
+ <remark role="help-example" condition="AES_DECRYPT"/>
<programlisting>
INSERT INTO t VALUES (1,AES_ENCRYPT('text','password'));
@@ -11430,10 +11548,10 @@
</listitem>
<listitem>
- <remark>
- description_for_help_topic DECODE
- </remark>
+ <remark role="help-topic" condition="DECODE"/>
+ <remark role="help-syntax-begin"/>
+
<para>
<indexterm type="function">
<primary>DECODE()</primary>
@@ -11442,6 +11560,10 @@
<literal>DECODE(<replaceable>crypt_str</replaceable>,<replaceable>pass_str</replaceable>)</literal>
</para>
+ <remark role="help-syntax-end"/>
+
+ <remark role="help-description-begin"/>
+
<para>
Decrypts the encrypted string
<replaceable>crypt_str</replaceable> using
@@ -11450,16 +11572,14 @@
returned from <literal>ENCODE()</literal>.
</para>
- <remark>
- end_description_for_help_topic
- </remark>
+ <remark role="help-description-end"/>
</listitem>
<listitem>
- <remark>
- description_for_help_topic ENCODE
- </remark>
+ <remark role="help-topic" condition="ENCODE"/>
+ <remark role="help-syntax-begin"/>
+
<para>
<indexterm type="function">
<primary>ENCODE()</primary>
@@ -11468,6 +11588,10 @@
<literal>ENCODE(<replaceable>str</replaceable>,<replaceable>pass_str</replaceable>)</literal>
</para>
+ <remark role="help-syntax-end"/>
+
+ <remark role="help-description-begin"/>
+
<para>
Encrypt <replaceable>str</replaceable> using
<replaceable>pass_str</replaceable> as the password. To
@@ -11480,16 +11604,14 @@
column, use a <literal>BLOB</literal> column type.
</para>
- <remark>
- end_description_for_help_topic
- </remark>
+ <remark role="help-description-end"/>
</listitem>
<listitem>
- <remark>
- description_for_help_topic DES_DECRYPT
- </remark>
+ <remark role="help-topic" condition="DES_DECRYPT"/>
+ <remark role="help-syntax-begin"/>
+
<para>
<indexterm type="function">
<primary>DES_DECRYPT()</primary>
@@ -11498,6 +11620,10 @@
<literal>DES_DECRYPT(<replaceable>crypt_str</replaceable>[,<replaceable>key_str</replaceable>])</literal>
</para>
+ <remark role="help-syntax-end"/>
+
+ <remark role="help-description-begin"/>
+
<para>
Decrypts a string encrypted with
<literal>DES_ENCRYPT()</literal>. On error, this function
@@ -11533,9 +11659,7 @@
<replaceable>crypt_str</replaceable>.
</para>
- <remark>
- end_description_for_help_topic
- </remark>
+ <remark role="help-description-end"/>
<para>
<literal>DES_DECRYPT()</literal> was added in MySQL 4.0.1.
@@ -11543,10 +11667,10 @@
</listitem>
<listitem>
- <remark>
- description_for_help_topic DES_ENCRYPT
- </remark>
+ <remark role="help-topic" condition="DES_ENCRYPT"/>
+ <remark role="help-syntax-begin"/>
+
<para>
<indexterm type="function">
<primary>DES_ENCRYPT()</primary>
@@ -11555,12 +11679,18 @@
<literal>DES_ENCRYPT(<replaceable>str</replaceable>[,(<replaceable>key_num</replaceable>|<replaceable>key_str</replaceable>)])</literal>
</para>
+ <remark role="help-syntax-end"/>
+
+ <remark role="help-description-begin"/>
+
<para>
Encrypts the string with the given key using the Triple-DES
algorithm. On error, this function returns
<literal>NULL</literal>.
</para>
+ <remark role="help-description-end"/>
+
<para>
Note that this function works only if MySQL has been
configured with SSL support. See
@@ -11621,17 +11751,11 @@
(8-(<replaceable>orig_len</replaceable> % 8))+1</literal>.
</para>
- <remark>
- end_description_for_help_topic
- </remark>
-
<para>
Each line in the DES key file has the following format:
</para>
- <remark>
- example_for_help_topic DES_ENCRYPT
- </remark>
+ <remark role="help-example" condition="DES_ENCRYPT"/>
<programlisting>
<replaceable>key_num</replaceable>
<replaceable>des_key_str</replaceable>
@@ -11672,10 +11796,10 @@
</listitem>
<listitem>
- <remark>
- description_for_help_topic ENCRYPT
- </remark>
+ <remark role="help-topic" condition="ENCRYPT"/>
+ <remark role="help-syntax-begin"/>
+
<para>
<indexterm type="function">
<primary>ENCRYPT()</primary>
@@ -11684,6 +11808,10 @@
<literal>ENCRYPT(<replaceable>str</replaceable>[,<replaceable>salt</replaceable>])</literal>
</para>
+ <remark role="help-syntax-end"/>
+
+ <remark role="help-description-begin"/>
+
<para>
Encrypt <replaceable>str</replaceable> using the Unix
<literal>crypt()</literal> system call. The
@@ -11694,13 +11822,9 @@
is given, a random value is used.
</para>
- <remark>
- end_description_for_help_topic
- </remark>
+ <remark role="help-description-end"/>
- <remark>
- example_for_help_topic ENCRYPT
- </remark>
+ <remark role="help-example" condition="ENCRYPT"/>
<programlisting>
mysql> <userinput>SELECT ENCRYPT('hello');</userinput>
@@ -11726,10 +11850,10 @@
</listitem>
<listitem>
- <remark>
- description_for_help_topic MD5
- </remark>
+ <remark role="help-topic" condition="MD5"/>
+ <remark role="help-syntax-begin"/>
+
<para>
<indexterm type="function">
<primary>MD5()</primary>
@@ -11738,6 +11862,10 @@
<literal>MD5(<replaceable>str</replaceable>)</literal>
</para>
+ <remark role="help-syntax-end"/>
+
+ <remark role="help-description-begin"/>
+
<para>
Calculates an MD5 128-bit checksum for the string. The value
is returned as a binary string of 32 hex digits, or
@@ -11746,13 +11874,9 @@
be used as a hash key.
</para>
- <remark>
- end_description_for_help_topic
- </remark>
+ <remark role="help-description-end"/>
- <remark>
- example_for_help_topic MD5
- </remark>
+ <remark role="help-example" condition="MD5"/>
<programlisting>
mysql> <userinput>SELECT MD5('testing');</userinput>
@@ -11777,10 +11901,10 @@
</listitem>
<listitem>
- <remark>
- description_for_help_topic OLD_PASSWORD
- </remark>
+ <remark role="help-topic" condition="OLD_PASSWORD"/>
+ <remark role="help-syntax-begin"/>
+
<para>
<indexterm type="function">
<primary>OLD_PASSWORD()</primary>
@@ -11789,6 +11913,10 @@
<literal>OLD_PASSWORD(<replaceable>str</replaceable>)</literal>
</para>
+ <remark role="help-syntax-end"/>
+
+ <remark role="help-description-begin"/>
+
<para>
<literal>OLD_PASSWORD()</literal> is available as of MySQL
4.1, when the implementation of
@@ -11798,13 +11926,15 @@
<literal>PASSWORD()</literal>.
<xref linkend="password-hashing"/>.
</para>
+
+ <remark role="help-description-end"/>
</listitem>
<listitem>
- <remark>
- description_for_help_topic PASSWORD
- </remark>
+ <remark role="help-topic" condition="PASSWORD"/>
+ <remark role="help-syntax-begin"/>
+
<para>
<indexterm type="function">
<primary>PASSWORD()</primary>
@@ -11813,6 +11943,10 @@
<literal>PASSWORD(<replaceable>str</replaceable>)</literal>
</para>
+ <remark role="help-syntax-end"/>
+
+ <remark role="help-description-begin"/>
+
<para>
Calculates and returns a password string from the plaintext
password <replaceable>str</replaceable>, or
@@ -11823,13 +11957,9 @@
<literal>user</literal> grant table.
</para>
- <remark>
- end_description_for_help_topic
- </remark>
+ <remark role="help-description-end"/>
- <remark>
- example_for_help_topic PASSWORD
- </remark>
+ <remark role="help-example" condition="PASSWORD"/>
<programlisting>
mysql> <userinput>SELECT PASSWORD('badpwd');</userinput>
@@ -11865,10 +11995,14 @@
</listitem>
<listitem>
- <remark>
- description_for_help_topic SHA SHA1
+ <remark role="help-topic" condition="SHA"/>
+
+ <remark role="help-keywords">
+ SHA1
</remark>
+ <remark role="help-syntax-begin"/>
+
<para>
<indexterm type="function">
<primary>SHA1()</primary>
@@ -11878,10 +12012,14 @@
<primary>SHA()</primary>
</indexterm>
-
<literal>SHA1(<replaceable>str</replaceable>)</literal>,
+
<literal>SHA1(<replaceable>str</replaceable>)</literal>
<literal>SHA(<replaceable>str</replaceable>)</literal>
</para>
+ <remark role="help-syntax-end"/>
+
+ <remark role="help-description-begin"/>
+
<para>
Calculates an SHA1 160-bit checksum for the string, as
described in RFC 3174 (Secure Hash Algorithm). The value is
@@ -11892,13 +12030,9 @@
cryptographically safe function for storing passwords.
</para>
- <remark>
- end_description_for_help_topic
- </remark>
+ <remark role="help-description-end"/>
- <remark>
- example_for_help_topic SHA
- </remark>
+ <remark role="help-example" condition="SHA"/>
<programlisting>
mysql> <userinput>SELECT SHA1('abc');</userinput>
@@ -11930,17 +12064,15 @@
<secondary>information</secondary>
</indexterm>
- <remark>
- help_category Information Functions@Functions
- </remark>
+ <remark role="help-category" condition="Information Functions@Functions"/>
<itemizedlist>
<listitem>
- <remark>
- description_for_help_topic BENCHMARK
- </remark>
+ <remark role="help-topic" condition="BENCHMARK"/>
+ <remark role="help-syntax-begin"/>
+
<para>
<indexterm type="function">
<primary>BENCHMARK()</primary>
@@ -11949,6 +12081,10 @@
<literal>BENCHMARK(<replaceable>count</replaceable>,<replaceable>expr</replaceable>)</literal>
</para>
+ <remark role="help-syntax-end"/>
+
+ <remark role="help-description-begin"/>
+
<para>
The <literal>BENCHMARK()</literal> function executes the
expression <replaceable>expr</replaceable> repeatedly
@@ -11959,13 +12095,9 @@
reports query execution times:
</para>
- <remark>
- end_description_for_help_topic
- </remark>
+ <remark role="help-description-end"/>
- <remark>
- example_for_help_topic BENCHMARK
- </remark>
+ <remark role="help-example" condition="BENCHMARK"/>
<programlisting>
mysql> <userinput>SELECT
BENCHMARK(1000000,ENCODE('hello','goodbye'));</userinput>
@@ -11987,10 +12119,10 @@
</listitem>
<listitem>
- <remark>
- description_for_help_topic CHARSET
- </remark>
+ <remark role="help-topic" condition="CHARSET"/>
+ <remark role="help-syntax-begin"/>
+
<para>
<indexterm type="function">
<primary>CHARSET()</primary>
@@ -11999,17 +12131,17 @@
<literal>CHARSET(<replaceable>str</replaceable>)</literal>
</para>
+ <remark role="help-syntax-end"/>
+
+ <remark role="help-description-begin"/>
+
<para>
Returns the character set of the string argument.
</para>
- <remark>
- end_description_for_help_topic
- </remark>
+ <remark role="help-description-end"/>
- <remark>
- example_for_help_topic CHARSET
- </remark>
+ <remark role="help-example" condition="CHARSET"/>
<programlisting>
mysql> <userinput>SELECT CHARSET('abc');</userinput>
@@ -12026,10 +12158,10 @@
</listitem>
<listitem>
- <remark>
- description_for_help_topic COERCIBILITY
- </remark>
+ <remark role="help-topic" condition="COERCIBILITY"/>
+ <remark role="help-syntax-begin"/>
+
<para>
<indexterm type="function">
<primary>COERCIBILITY()</primary>
@@ -12038,18 +12170,18 @@
<literal>COERCIBILITY(<replaceable>str</replaceable>)</literal>
</para>
+ <remark role="help-syntax-end"/>
+
+ <remark role="help-description-begin"/>
+
<para>
Returns the collation coercibility value of the string
argument.
</para>
- <remark>
- end_description_for_help_topic
- </remark>
+ <remark role="help-description-end"/>
- <remark>
- example_for_help_topic COERCIBILITY
- </remark>
+ <remark role="help-example" condition="COERCIBILITY"/>
<programlisting>
mysql> <userinput>SELECT COERCIBILITY('abc' COLLATE
latin1_swedish_ci);</userinput>
@@ -12161,10 +12293,10 @@
</listitem>
<listitem>
- <remark>
- description_for_help_topic COLLATION
- </remark>
+ <remark role="help-topic" condition="COLLATION"/>
+ <remark role="help-syntax-begin"/>
+
<para>
<indexterm type="function">
<primary>COLLATION()</primary>
@@ -12173,18 +12305,18 @@
<literal>COLLATION(<replaceable>str</replaceable>)</literal>
</para>
+ <remark role="help-syntax-end"/>
+
+ <remark role="help-description-begin"/>
+
<para>
Returns the collation for the character set of the string
argument.
</para>
- <remark>
- end_description_for_help_topic
- </remark>
+ <remark role="help-description-end"/>
- <remark>
- example_for_help_topic COLLATION
- </remark>
+ <remark role="help-example" condition="COLLATION"/>
<programlisting>
mysql> <userinput>SELECT COLLATION('abc');</userinput>
@@ -12199,10 +12331,10 @@
</listitem>
<listitem>
- <remark>
- description_for_help_topic CONNECTION_ID
- </remark>
+ <remark role="help-topic" condition="CONNECTION_ID"/>
+ <remark role="help-syntax-begin"/>
+
<para>
<indexterm type="function">
<primary>CONNECTION_ID()</primary>
@@ -12211,18 +12343,18 @@
<literal>CONNECTION_ID()</literal>
</para>
+ <remark role="help-syntax-end"/>
+
+ <remark role="help-description-begin"/>
+
<para>
Returns the connection ID (thread ID) for the connection.
Every connection has its own unique ID.
</para>
- <remark>
- end_description_for_help_topic
- </remark>
+ <remark role="help-description-end"/>
- <remark>
- example_for_help_topic CONNECTION_ID
- </remark>
+ <remark role="help-example" condition="CONNECTION_ID"/>
<programlisting>
mysql> <userinput>SELECT CONNECTION_ID();</userinput>
@@ -12236,10 +12368,10 @@
</listitem>
<listitem>
- <remark>
- description_for_help_topic CURRENT_USER
- </remark>
+ <remark role="help-topic" condition="CURRENT_USER"/>
+ <remark role="help-syntax-begin"/>
+
<para>
<indexterm type="function">
<primary>CURRENT_USER()</primary>
@@ -12248,6 +12380,10 @@
<literal>CURRENT_USER()</literal>
</para>
+ <remark role="help-syntax-end"/>
+
+ <remark role="help-description-begin"/>
+
<para>
Returns the username and hostname combination that the
current session was authenticated as. This value corresponds
@@ -12256,13 +12392,9 @@
<literal>USER()</literal>.
</para>
- <remark>
- end_description_for_help_topic
- </remark>
+ <remark role="help-description-end"/>
- <remark>
- example_for_help_topic CURRENT_USER
- </remark>
+ <remark role="help-example" condition="CURRENT_USER"/>
<programlisting>
mysql> <userinput>SELECT USER();</userinput>
@@ -12293,10 +12425,10 @@
</listitem>
<listitem>
- <remark>
- description_for_help_topic DATABASE
- </remark>
+ <remark role="help-topic" condition="DATABASE"/>
+ <remark role="help-syntax-begin"/>
+
<para>
<indexterm type="function">
<primary>DATABASE()</primary>
@@ -12305,19 +12437,19 @@
<literal>DATABASE()</literal>
</para>
+ <remark role="help-syntax-end"/>
+
+ <remark role="help-description-begin"/>
+
<para>
Returns the default (current) database name. As of MySQL
4.1, the string has the <literal>utf8</literal> character
set.
</para>
- <remark>
- end_description_for_help_topic
- </remark>
+ <remark role="help-description-end"/>
- <remark>
- example_for_help_topic DATABASE
- </remark>
+ <remark role="help-example" condition="DATABASE"/>
<programlisting>
mysql> <userinput>SELECT DATABASE();</userinput>
@@ -12333,10 +12465,10 @@
</listitem>
<listitem>
- <remark>
- description_for_help_topic FOUND_ROWS
- </remark>
+ <remark role="help-topic" condition="FOUND_ROWS"/>
+ <remark role="help-syntax-begin"/>
+
<para>
<indexterm type="function">
<primary>FOUND_ROWS()</primary>
@@ -12349,6 +12481,10 @@
<literal>FOUND_ROWS()</literal>
</para>
+ <remark role="help-syntax-end"/>
+
+ <remark role="help-description-begin"/>
+
<para>
A <literal>SELECT</literal> statement may include a
<literal>LIMIT</literal> clause to restrict the number of
@@ -12361,13 +12497,9 @@
<literal>FOUND_ROWS()</literal> afterward:
</para>
- <remark>
- end_description_for_help_topic
- </remark>
+ <remark role="help-description-end"/>
- <remark>
- example_for_help_topic FOUND_ROWS
- </remark>
+ <remark role="help-example" condition="FOUND_ROWS"/>
<programlisting>
mysql> <userinput>SELECT SQL_CALC_FOUND_ROWS * FROM
<replaceable>tbl_name</replaceable></userinput>
@@ -12482,31 +12614,31 @@
</listitem>
<listitem>
- <remark>
- description_for_help_topic LAST_INSERT_ID
- </remark>
+ <remark role="help-topic" condition="LAST_INSERT_ID"/>
+ <remark role="help-syntax-begin"/>
+
<para>
<indexterm type="function">
<primary>LAST_INSERT_ID([<replaceable>expr</replaceable>])</primary>
</indexterm>
- <literal>LAST_INSERT_ID()</literal>,
+ <literal>LAST_INSERT_ID()</literal>
<literal>LAST_INSERT_ID(<replaceable>expr</replaceable>)</literal>
</para>
+ <remark role="help-syntax-end"/>
+
+ <remark role="help-description-begin"/>
+
<para>
Returns the last automatically generated value that was
inserted into an <literal>AUTO_INCREMENT</literal> column.
</para>
- <remark>
- end_description_for_help_topic
- </remark>
+ <remark role="help-description-end"/>
- <remark>
- example_for_help_topic LAST_INSERT_ID
- </remark>
+ <remark role="help-example" condition="LAST_INSERT_ID"/>
<programlisting>
mysql> <userinput>SELECT LAST_INSERT_ID();</userinput>
@@ -12629,10 +12761,10 @@
</listitem>
<listitem>
- <remark>
- description_for_help_topic SESSION_USER
- </remark>
+ <remark role="help-topic" condition="SESSION_USER"/>
+ <remark role="help-syntax-begin"/>
+
<para>
<indexterm type="function">
<primary>SESSION_USER()</primary>
@@ -12641,21 +12773,23 @@
<literal>SESSION_USER()</literal>
</para>
+ <remark role="help-syntax-end"/>
+
+ <remark role="help-description-begin"/>
+
<para>
<literal>SESSION_USER()</literal> is a synonym for
<literal>USER()</literal>.
</para>
- <remark>
- end_description_for_help_topic
- </remark>
+ <remark role="help-description-end"/>
</listitem>
<listitem>
- <remark>
- description_for_help_topic SYSTEM_USER
- </remark>
+ <remark role="help-topic" condition="SYSTEM_USER"/>
+ <remark role="help-syntax-begin"/>
+
<para>
<indexterm type="function">
<primary>SYSTEM_USER()</primary>
@@ -12664,21 +12798,23 @@
<literal>SYSTEM_USER()</literal>
</para>
+ <remark role="help-syntax-end"/>
+
+ <remark role="help-description-begin"/>
+
<para>
<literal>SYSTEM_USER()</literal> is a synonym for
<literal>USER()</literal>.
</para>
- <remark>
- end_description_for_help_topic
- </remark>
+ <remark role="help-description-end"/>
</listitem>
<listitem>
- <remark>
- description_for_help_topic USER
- </remark>
+ <remark role="help-topic" condition="USER"/>
+ <remark role="help-syntax-begin"/>
+
<para>
<indexterm type="function">
<primary>USER()</primary>
@@ -12687,17 +12823,17 @@
<literal>USER()</literal>
</para>
+ <remark role="help-syntax-end"/>
+
+ <remark role="help-description-begin"/>
+
<para>
Returns the current MySQL username and hostname.
</para>
- <remark>
- end_description_for_help_topic
- </remark>
+ <remark role="help-description-end"/>
- <remark>
- example_for_help_topic USER
- </remark>
+ <remark role="help-example" condition="USER"/>
<programlisting>
mysql> <userinput>SELECT USER();</userinput>
@@ -12737,10 +12873,10 @@
</listitem>
<listitem>
- <remark>
- description_for_help_topic VERSION
- </remark>
+ <remark role="help-topic" condition="VERSION"/>
+ <remark role="help-syntax-begin"/>
+
<para>
<indexterm type="function">
<primary>VERSION()</primary>
@@ -12749,19 +12885,19 @@
<literal>VERSION()</literal>
</para>
+ <remark role="help-syntax-end"/>
+
+ <remark role="help-description-begin"/>
+
<para>
Returns a string that indicates the MySQL server version. As
of MySQL 4.1, the string has the <literal>utf8</literal>
character set.
</para>
- <remark>
- end_description_for_help_topic
- </remark>
+ <remark role="help-description-end"/>
- <remark>
- example_for_help_topic VERSION
- </remark>
+ <remark role="help-example" condition="VERSION"/>
<programlisting>
mysql> <userinput>SELECT VERSION();</userinput>
@@ -12791,17 +12927,15 @@
<secondary>miscellaneous</secondary>
</indexterm>
- <remark>
- help_category Miscellaneous Functions@Functions
- </remark>
+ <remark role="help-category" condition="Miscellaneous Functions@Functions"/>
<itemizedlist>
<listitem>
- <remark>
- description_for_help_topic DEFAULT
- </remark>
+ <remark role="help-topic" condition="DEFAULT"/>
+ <remark role="help-syntax-begin"/>
+
<para>
<indexterm type="function">
<primary>DEFAULT()</primary>
@@ -12810,17 +12944,17 @@
<literal>DEFAULT(<replaceable>col_name</replaceable>)</literal>
</para>
+ <remark role="help-syntax-end"/>
+
+ <remark role="help-description-begin"/>
+
<para>
Returns the default value for a table column.
</para>
- <remark>
- end_description_for_help_topic
- </remark>
+ <remark role="help-description-end"/>
- <remark>
- example_for_help_topic DEFAULT
- </remark>
+ <remark role="help-example" condition="DEFAULT"/>
<programlisting>
mysql> <userinput>UPDATE t SET i = DEFAULT(i)+1 WHERE id <
100;</userinput>
@@ -12832,10 +12966,10 @@
</listitem>
<listitem>
- <remark>
- description_for_help_topic FORMAT
- </remark>
+ <remark role="help-topic" condition="FORMAT"/>
+ <remark role="help-syntax-begin"/>
+
<para>
<indexterm type="function">
<primary>FORMAT()</primary>
@@ -12844,6 +12978,10 @@
<literal>FORMAT(<replaceable>X</replaceable>,<replaceable>D</replaceable>)</literal>
</para>
+ <remark role="help-syntax-end"/>
+
+ <remark role="help-description-begin"/>
+
<para>
Formats the number <replaceable>X</replaceable> to a format
like <literal>'#,###,###.##'</literal>, rounded to
@@ -12853,13 +12991,9 @@
fractional part.
</para>
- <remark>
- end_description_for_help_topic
- </remark>
+ <remark role="help-description-end"/>
- <remark>
- example_for_help_topic FORMAT
- </remark>
+ <remark role="help-example" condition="FORMAT"/>
<programlisting>
mysql> <userinput>SELECT FORMAT(12332.123456, 4);</userinput>
@@ -12872,10 +13006,10 @@
</listitem>
<listitem>
- <remark>
- description_for_help_topic GET_LOCK
- </remark>
+ <remark role="help-topic" condition="GET_LOCK"/>
+ <remark role="help-syntax-begin"/>
+
<para>
<indexterm>
<primary>timeout</primary>
@@ -12888,6 +13022,10 @@
<literal>GET_LOCK(<replaceable>str</replaceable>,<replaceable>timeout</replaceable>)</literal>
</para>
+ <remark role="help-syntax-end"/>
+
+ <remark role="help-description-begin"/>
+
<para>
Tries to obtain a lock with a name given by the string
<replaceable>str</replaceable>, with a timeout of
@@ -12923,13 +13061,9 @@
<replaceable>app_name.str</replaceable>.
</para>
- <remark>
- end_description_for_help_topic
- </remark>
+ <remark role="help-description-end"/>
- <remark>
- example_for_help_topic GET_LOCK
- </remark>
+ <remark role="help-example" condition="GET_LOCK"/>
<programlisting>
mysql> <userinput>SELECT GET_LOCK('lock1',10);</userinput>
@@ -12953,10 +13087,10 @@
</listitem>
<listitem>
- <remark>
- description_for_help_topic INET_ATON
- </remark>
+ <remark role="help-topic" condition="INET_ATON"/>
+ <remark role="help-syntax-begin"/>
+
<para>
<indexterm type="function">
<primary>INET_ATON()</primary>
@@ -12965,6 +13099,10 @@
<literal>INET_ATON(<replaceable>expr</replaceable>)</literal>
</para>
+ <remark role="help-syntax-end"/>
+
+ <remark role="help-description-begin"/>
+
<para>
Given the dotted-quad representation of a network address as
a string, returns an integer that represents the numeric
@@ -12972,13 +13110,9 @@
addresses.
</para>
- <remark>
- end_description_for_help_topic
- </remark>
+ <remark role="help-description-end"/>
- <remark>
- example_for_help_topic INET_ATON
- </remark>
+ <remark role="help-example" condition="INET_ATON"/>
<programlisting>
mysql> <userinput>SELECT INET_ATON('209.207.224.40');</userinput>
@@ -13021,10 +13155,10 @@
</listitem>
<listitem>
- <remark>
- description_for_help_topic INET_NTOA
- </remark>
+ <remark role="help-topic" condition="INET_NTOA"/>
+ <remark role="help-syntax-begin"/>
+
<para>
<indexterm type="function">
<primary>INET_NTOA()</primary>
@@ -13033,18 +13167,18 @@
<literal>INET_NTOA(<replaceable>expr</replaceable>)</literal>
</para>
+ <remark role="help-syntax-end"/>
+
+ <remark role="help-description-begin"/>
+
<para>
Given a numeric network address (4 or 8 byte), returns the
dotted-quad representation of the address as a string.
</para>
- <remark>
- end_description_for_help_topic
- </remark>
+ <remark role="help-description-end"/>
- <remark>
- example_for_help_topic INET_NTOA
- </remark>
+ <remark role="help-example" condition="INET_NTOA"/>
<programlisting>
mysql> <userinput>SELECT INET_NTOA(3520061480);</userinput>
@@ -13057,10 +13191,10 @@
</listitem>
<listitem>
- <remark>
- description_for_help_topic IS_FREE_LOCK
- </remark>
+ <remark role="help-topic" condition="IS_FREE_LOCK"/>
+ <remark role="help-syntax-begin"/>
+
<para>
<indexterm type="function">
<primary>IS_FREE_LOCK()</primary>
@@ -13069,6 +13203,10 @@
<literal>IS_FREE_LOCK(<replaceable>str</replaceable>)</literal>
</para>
+ <remark role="help-syntax-end"/>
+
+ <remark role="help-description-begin"/>
+
<para>
Checks whether the lock named <replaceable>str</replaceable>
is free to use (that is, not locked). Returns
@@ -13078,9 +13216,7 @@
arguments).
</para>
- <remark>
- end_description_for_help_topic
- </remark>
+ <remark role="help-description-end"/>
<para>
<literal>IS_FREE_LOCK()</literal> was added in MySQL 4.0.2.
@@ -13088,10 +13224,10 @@
</listitem>
<listitem>
- <remark>
- description_for_help_topic IS_USED_LOCK
- </remark>
+ <remark role="help-topic" condition="IS_USED_LOCK"/>
+ <remark role="help-syntax-begin"/>
+
<para>
<indexterm type="function">
<primary>IS_USED_LOCK()</primary>
@@ -13100,6 +13236,10 @@
<literal>IS_USED_LOCK(<replaceable>str</replaceable>)</literal>
</para>
+ <remark role="help-syntax-end"/>
+
+ <remark role="help-description-begin"/>
+
<para>
Checks whether the lock named <replaceable>str</replaceable>
is in use (that is, locked). If so, it returns the
@@ -13107,9 +13247,7 @@
Otherwise, it returns <literal>NULL</literal>.
</para>
- <remark>
- end_description_for_help_topic
- </remark>
+ <remark role="help-description-end"/>
<para>
<literal>IS_USED_LOCK()</literal> was added in MySQL 4.1.0.
@@ -13117,10 +13255,10 @@
</listitem>
<listitem>
- <remark>
- description_for_help_topic MASTER_POS_WAIT
- </remark>
+ <remark role="help-topic" condition="MASTER_POS_WAIT"/>
+ <remark role="help-syntax-begin"/>
+
<para>
<indexterm type="function">
<primary>MASTER_POS_WAIT()</primary>
@@ -13129,6 +13267,10 @@
<literal>MASTER_POS_WAIT(<replaceable>log_name</replaceable>,<replaceable>log_pos</replaceable>[,<replaceable>timeout</replaceable>])</literal>
</para>
+ <remark role="help-syntax-end"/>
+
+ <remark role="help-description-begin"/>
+
<para>
This function is useful for control of master/slave
synchronization. It blocks until the slave has read and
@@ -13146,9 +13288,7 @@
immediately.
</para>
- <remark>
- end_description_for_help_topic
- </remark>
+ <remark role="help-description-end"/>
<para>
If a <replaceable>timeout</replaceable> value is specified,
@@ -13167,10 +13307,10 @@
</listitem>
<listitem>
- <remark>
- description_for_help_topic RELEASE_LOCK
- </remark>
+ <remark role="help-topic" condition="RELEASE_LOCK"/>
+ <remark role="help-syntax-begin"/>
+
<para>
<indexterm type="function">
<primary>RELEASE_LOCK()</primary>
@@ -13179,6 +13319,10 @@
<literal>RELEASE_LOCK(<replaceable>str</replaceable>)</literal>
</para>
+ <remark role="help-syntax-end"/>
+
+ <remark role="help-description-begin"/>
+
<para>
Releases the lock named by the string
<replaceable>str</replaceable> that was obtained with
@@ -13197,16 +13341,14 @@
<xref linkend="do"/>.
</para>
- <remark>
- end_description_for_help_topic
- </remark>
+ <remark role="help-description-end"/>
</listitem>
<listitem>
- <remark>
- description_for_help_topic UUID
- </remark>
+ <remark role="help-topic" condition="UUID"/>
+ <remark role="help-syntax-begin"/>
+
<para>
<indexterm type="function">
<primary>UUID()</primary>
@@ -13215,6 +13357,10 @@
<literal>UUID()</literal>
</para>
+ <remark role="help-syntax-end"/>
+
+ <remark role="help-description-begin"/>
+
<para>
Returns a Universal Unique Identifier (UUID) generated
according to <quote>DCE 1.1: Remote Procedure Call</quote>
@@ -13277,13 +13423,9 @@
</itemizedlist>
- <remark>
- end_description_for_help_topic
- </remark>
+ <remark role="help-description-end"/>
- <remark>
- example_for_help_topic UUID
- </remark>
+ <remark role="help-example" condition="UUID"/>
<programlisting>
mysql> <userinput>SELECT UUID();</userinput>
@@ -13310,11 +13452,6 @@
<title
id="title-group-by-functions-and-modifiers">&title-group-by-functions-and-modifiers;</title>
- <remark>
- help_category Functions and Modifiers for Use with GROUP BY
- Clauses@Functions
- </remark>
-
<section id="group-by-functions">
<title
id="title-group-by-functions">&title-group-by-functions;</title>
@@ -13328,6 +13465,8 @@
<secondary>GROUP BY</secondary>
</indexterm>
+ <remark role="help-category" condition="Functions and Modifiers for Use with
GROUP BY"/>
+
<para>
This section describes group (aggregate) functions that operate
on sets of values. Unless otherwise stated, group functions
@@ -13343,10 +13482,10 @@
<itemizedlist>
<listitem>
- <remark>
- description_for_help_topic AVG
- </remark>
+ <remark role="help-topic" condition="AVG"/>
+ <remark role="help-syntax-begin"/>
+
<para>
<indexterm type="function">
<primary>AVG()</primary>
@@ -13356,18 +13495,18 @@
<literal><replaceable>expr</replaceable></literal>.
</para>
+ <remark role="help-syntax-end"/>
+
+ <remark role="help-description-begin"/>
+
<para>
<literal>AVG()</literal> returns
<literal>NULL</literal> if
there were no matching rows.
</para>
- <remark>
- end_description_for_help_topic
- </remark>
+ <remark role="help-description-end"/>
- <remark>
- example_for_help_topic AVG
- </remark>
+ <remark role="help-example" condition="AVG"/>
<programlisting>
mysql> <userinput>SELECT student_name, AVG(test_score)</userinput>
@@ -13377,10 +13516,10 @@
</listitem>
<listitem>
- <remark>
- description_for_help_topic BIT_AND
- </remark>
+ <remark role="help-topic" condition="BIT_AND"/>
+ <remark role="help-syntax-begin"/>
+
<para>
<indexterm type="function">
<primary>BIT_AND()</primary>
@@ -13389,15 +13528,17 @@
<literal>BIT_AND(<replaceable>expr</replaceable>)</literal>
</para>
+ <remark role="help-syntax-end"/>
+
+ <remark role="help-description-begin"/>
+
<para>
Returns the bitwise <literal>AND</literal> of all bits in
<replaceable>expr</replaceable>. The calculation is
performed with 64-bit (<literal>BIGINT</literal>) precision.
</para>
- <remark>
- end_description_for_help_topic
- </remark>
+ <remark role="help-description-end"/>
<para>
As of MySQL 4.0.17, this function returns
@@ -13410,10 +13551,10 @@
</listitem>
<listitem>
- <remark>
- description_for_help_topic BIT_OR
- </remark>
+ <remark role="help-topic" condition="BIT_OR"/>
+ <remark role="help-syntax-begin"/>
+
<para>
<indexterm type="function">
<primary>BIT_OR()</primary>
@@ -13422,15 +13563,17 @@
<literal>BIT_OR(<replaceable>expr</replaceable>)</literal>
</para>
+ <remark role="help-syntax-end"/>
+
+ <remark role="help-description-begin"/>
+
<para>
Returns the bitwise <literal>OR</literal> of all bits in
<replaceable>expr</replaceable>. The calculation is
performed with 64-bit (<literal>BIGINT</literal>) precision.
</para>
- <remark>
- end_description_for_help_topic
- </remark>
+ <remark role="help-description-end"/>
<para>
This function returns <literal>0</literal> if there were no
@@ -13439,10 +13582,10 @@
</listitem>
<listitem>
- <remark>
- description_for_help_topic BIT_XOR
- </remark>
+ <remark role="help-topic" condition="BIT_XOR"/>
+ <remark role="help-syntax-begin"/>
+
<para>
<indexterm type="function">
<primary>BIT_XOR()</primary>
@@ -13451,15 +13594,17 @@
<literal>BIT_XOR(<replaceable>expr</replaceable>)</literal>
</para>
+ <remark role="help-syntax-end"/>
+
+ <remark role="help-description-begin"/>
+
<para>
Returns the bitwise <literal>XOR</literal> of all bits in
<replaceable>expr</replaceable>. The calculation is
performed with 64-bit (<literal>BIGINT</literal>) precision.
</para>
- <remark>
- end_description_for_help_topic
- </remark>
+ <remark role="help-description-end"/>
<para>
This function returns <literal>0</literal> if there were no
@@ -13472,10 +13617,10 @@
</listitem>
<listitem>
- <remark>
- description_for_help_topic COUNT
- </remark>
+ <remark role="help-topic" condition="COUNT"/>
+ <remark role="help-syntax-begin"/>
+
<para>
<indexterm type="function">
<primary>COUNT()</primary>
@@ -13484,6 +13629,10 @@
<literal>COUNT(<replaceable>expr</replaceable>)</literal>
</para>
+ <remark role="help-syntax-end"/>
+
+ <remark role="help-description-begin"/>
+
<para>
Returns a count of the number of non-<literal>NULL</literal>
values in the rows retrieved by a <literal>SELECT</literal>
@@ -13495,13 +13644,9 @@
there were no matching rows.
</para>
- <remark>
- end_description_for_help_topic
- </remark>
+ <remark role="help-description-end"/>
- <remark>
- example_for_help_topic COUNT
- </remark>
+ <remark role="help-example" condition="COUNT"/>
<programlisting>
mysql> <userinput>SELECT student.student_name,COUNT(*)</userinput>
@@ -13541,10 +13686,14 @@
</listitem>
<listitem>
- <remark>
- description_for_help_topic COUNT DISTINCT COUNT DISTINCT
+ <remark role="help-topic" condition="COUNT DISTINCT"/>
+
+ <remark role="help-keywords">
+ DISTINCT COUNT DISTINCT
</remark>
+ <remark role="help-syntax-begin"/>
+
<para>
<indexterm type="function">
<primary>COUNT(DISTINCT)</primary>
@@ -13558,6 +13707,10 @@
<replaceable>expr</replaceable>,[<replaceable>expr</replaceable>...])</literal>
</para>
+ <remark role="help-syntax-end"/>
+
+ <remark role="help-description-begin"/>
+
<para>
Returns a count of the number of different
non-<literal>NULL</literal> values.
@@ -13568,13 +13721,9 @@
<literal>0</literal> if there were no matching rows.
</para>
- <remark>
- end_description_for_help_topic
- </remark>
+ <remark role="help-description-end"/>
- <remark>
- example_for_help_topic COUNT DISTINCT
- </remark>
+ <remark role="help-example" condition="COUNT DISTINCT"/>
<programlisting>
mysql> <userinput>SELECT COUNT(DISTINCT results) FROM
student;</userinput>
@@ -13595,11 +13744,14 @@
</listitem>
<listitem>
- <remark>
- description_for_help_topic GROUP_CONCAT DISTINCT SEPARATOR
- ORDER BY ASC DESC
+ <remark role="help-topic" condition="GROUP_CONCAT"/>
+
+ <remark role="help-keywords">
+ DISTINCT SEPARATOR
</remark>
+ <remark role="help-syntax-begin"/>
+
<para>
<indexterm type="function">
<primary>GROUP_CONCAT()</primary>
@@ -13608,6 +13760,10 @@
<literal>GROUP_CONCAT(<replaceable>expr</replaceable>)</literal>
</para>
+ <remark role="help-syntax-end"/>
+
+ <remark role="help-description-begin"/>
+
<para>
This function returns a string result with the concatenated
non-<literal>NULL</literal> values from a group. It returns
@@ -13623,13 +13779,9 @@
[SEPARATOR <replaceable>str_val</replaceable>])
</programlisting>
- <remark>
- end_description_for_help_topic
- </remark>
+ <remark role="help-description-end"/>
- <remark>
- example_for_help_topic GROUP_CONCAT
- </remark>
+ <remark role="help-example" condition="GROUP_CONCAT"/>
<programlisting>
mysql> <userinput>SELECT student_name,</userinput>
@@ -13718,10 +13870,14 @@
</listitem>
<listitem>
- <remark>
- description_for_help_topic MIN MAX MIN MAX DISTINCT
+ <remark role="help-topic" condition="MIN MAX"/>
+
+ <remark role="help-keywords">
+ MAX MIN MAX DISTINCT
</remark>
+ <remark role="help-syntax-begin"/>
+
<para>
<indexterm type="function">
<primary>MIN()</primary>
@@ -13748,13 +13904,9 @@
<literal>NULL</literal> if there were no matching rows.
</para>
- <remark>
- end_description_for_help_topic
- </remark>
+ <remark role="help-description-end"/>
- <remark>
- example_for_help_topic MIN MAX
- </remark>
+ <remark role="help-example" condition="MIN MAX"/>
<programlisting>
mysql> <userinput>SELECT student_name, MIN(test_score),
MAX(test_score)</userinput>
@@ -13773,10 +13925,14 @@
</listitem>
<listitem>
- <remark>
- description_for_help_topic STDDEV STD
+ <remark role="help-topic" condition="STDDEV"/>
+
+ <remark role="help-keywords">
+ STD
</remark>
+ <remark role="help-syntax-begin"/>
+
<para>
<indexterm type="function">
<primary>STD()</primary>
@@ -13795,10 +13951,14 @@
<secondary>with Oracle</secondary>
</indexterm>
-
<literal>STD(<replaceable>expr</replaceable>)</literal>,
+
<literal>STD(<replaceable>expr</replaceable>)</literal>
<literal>STDDEV(<replaceable>expr</replaceable>)</literal>
</para>
+ <remark role="help-syntax-end"/>
+
+ <remark role="help-description-begin"/>
+
<para>
Returns the population standard deviation of
<replaceable>expr</replaceable>. This is an extension to
@@ -13811,16 +13971,14 @@
no matching rows.
</para>
- <remark>
- end_description_for_help_topic
- </remark>
+ <remark role="help-description-end"/>
</listitem>
<listitem>
- <remark>
- description_for_help_topic SUM DISTINCT
- </remark>
+ <remark role="help-topic" condition="SUM"/>
+ <remark role="help-syntax-begin"/>
+
<para>
<indexterm type="function">
<primary>SUM()</primary>
@@ -13829,6 +13987,10 @@
<literal>SUM(<replaceable>expr</replaceable>)</literal>
</para>
+ <remark role="help-syntax-end"/>
+
+ <remark role="help-description-begin"/>
+
<para>
Returns the sum of <replaceable>expr</replaceable>. If the
return set has no rows, <literal>SUM()</literal> returns
@@ -13840,12 +14002,14 @@
there were no matching rows.
</para>
- <remark>
- end_description_for_help_topic
- </remark>
+ <remark role="help-description-end"/>
</listitem>
<listitem>
+ <remark role="help-topic" condition="VARIANCE"/>
+
+ <remark role="help-syntax-begin"/>
+
<para>
<indexterm type="function">
<primary>VARIANCE()</primary>
@@ -13860,14 +14024,16 @@
standard SQL, available in MySQL 4.1 or later.
</para>
+ <remark role="help-syntax-end"/>
+
+ <remark role="help-description-begin"/>
+
<para>
<literal>VARIANCE()</literal> returns
<literal>NULL</literal> if there were no matching rows.
</para>
- <remark>
- end_description_for_help_topic
- </remark>
+ <remark role="help-description-end"/>
</listitem>
</itemizedlist>
@@ -14211,14 +14377,6 @@
the following query:
</para>
- <remark>
- end_description_for_help_topic
- </remark>
-
- <remark>
- example_for_help_topic BIT_AND
- </remark>
-
<programlisting>
mysql> <userinput>SELECT order.custid, customer.name,
MAX(payments)</userinput>
-> <userinput>FROM order,customer</userinput>
| Thread |
|---|
| • svn commit - mysqldoc@docsrva: r74 - in trunk: refman refman-4.1 | paul | 17 Oct |