Author: jstephens
Date: 2010-04-26 11:33:46 +0200 (Mon, 26 Apr 2010)
New Revision: 20224
Log:
Combined items concerning inserts/selects to/from same table to remove ambiguity (user comment)
Modified:
trunk/refman-5.0/sql-syntax-data-manipulation.xml
trunk/refman-5.1/sql-syntax-data-manipulation.xml
trunk/refman-5.4/sql-syntax-data-manipulation.xml
trunk/refman-5.5/sql-syntax-data-manipulation.xml
trunk/refman-6.0/sql-syntax-data-manipulation.xml
Modified: trunk/refman-5.0/sql-syntax-data-manipulation.xml
===================================================================
--- trunk/refman-5.0/sql-syntax-data-manipulation.xml 2010-04-26 08:18:36 UTC (rev 20223)
+++ trunk/refman-5.0/sql-syntax-data-manipulation.xml 2010-04-26 09:33:46 UTC (rev 20224)
Changed blocks: 2, Lines Added: 12, Lines Deleted: 13; 2184 bytes
@@ -1557,12 +1557,18 @@
<literal role="stmt">INSERT</literal> statement may appear
in the <literal>FROM</literal> clause of the
<literal role="stmt">SELECT</literal> part of the query.
- (This was not possible in some older versions of MySQL.) In
- this case, MySQL creates a temporary table to hold the rows
- from the <literal role="stmt">SELECT</literal> and then
- inserts those rows into the target table. However, it
- remains true that you cannot use <literal>INSERT INTO t ...
- SELECT ... FROM t</literal> when <literal>t</literal> is a
+ (This was not possible in some older versions of MySQL.)
+ However, you cannot insert into a table and select from the
+ same table in a subquery.
+ </para>
+
+ <para>
+ When selecting from and inserting into a table at the same
+ time, MySQL creates a temporary table to hold the rows from
+ the <literal role="stmt">SELECT</literal> and then inserts
+ those rows into the target table. However, it remains true
+ that you cannot use <literal>INSERT INTO t ... SELECT ...
+ FROM t</literal> when <literal>t</literal> is a
<literal>TEMPORARY</literal> table, because
<literal>TEMPORARY</literal> tables cannot be referred to
twice in the same statement (see
@@ -1587,13 +1593,6 @@
<listitem>
<para>
- Currently, you cannot insert into a table and select from
- the same table in a subquery.
- </para>
- </listitem>
-
- <listitem>
- <para>
To avoid ambiguous column reference problems when the
<literal role="stmt">SELECT</literal> and the
<literal role="stmt">INSERT</literal> refer to the same
Modified: trunk/refman-5.1/sql-syntax-data-manipulation.xml
===================================================================
--- trunk/refman-5.1/sql-syntax-data-manipulation.xml 2010-04-26 08:18:36 UTC (rev 20223)
+++ trunk/refman-5.1/sql-syntax-data-manipulation.xml 2010-04-26 09:33:46 UTC (rev 20224)
Changed blocks: 2, Lines Added: 12, Lines Deleted: 13; 2184 bytes
@@ -1625,12 +1625,18 @@
<literal role="stmt">INSERT</literal> statement may appear
in the <literal>FROM</literal> clause of the
<literal role="stmt">SELECT</literal> part of the query.
- (This was not possible in some older versions of MySQL.) In
- this case, MySQL creates a temporary table to hold the rows
- from the <literal role="stmt">SELECT</literal> and then
- inserts those rows into the target table. However, it
- remains true that you cannot use <literal>INSERT INTO t ...
- SELECT ... FROM t</literal> when <literal>t</literal> is a
+ (This was not possible in some older versions of MySQL.)
+ However, you cannot insert into a table and select from the
+ same table in a subquery.
+ </para>
+
+ <para>
+ When selecting from and inserting into a table at the same
+ time, MySQL creates a temporary table to hold the rows from
+ the <literal role="stmt">SELECT</literal> and then inserts
+ those rows into the target table. However, it remains true
+ that you cannot use <literal>INSERT INTO t ... SELECT ...
+ FROM t</literal> when <literal>t</literal> is a
<literal>TEMPORARY</literal> table, because
<literal>TEMPORARY</literal> tables cannot be referred to
twice in the same statement (see
@@ -1655,13 +1661,6 @@
<listitem>
<para>
- Currently, you cannot insert into a table and select from
- the same table in a subquery.
- </para>
- </listitem>
-
- <listitem>
- <para>
To avoid ambiguous column reference problems when the
<literal role="stmt">SELECT</literal> and the
<literal role="stmt">INSERT</literal> refer to the same
Modified: trunk/refman-5.4/sql-syntax-data-manipulation.xml
===================================================================
--- trunk/refman-5.4/sql-syntax-data-manipulation.xml 2010-04-26 08:18:36 UTC (rev 20223)
+++ trunk/refman-5.4/sql-syntax-data-manipulation.xml 2010-04-26 09:33:46 UTC (rev 20224)
Changed blocks: 2, Lines Added: 12, Lines Deleted: 13; 2184 bytes
@@ -1619,12 +1619,18 @@
<literal role="stmt">INSERT</literal> statement may appear
in the <literal>FROM</literal> clause of the
<literal role="stmt">SELECT</literal> part of the query.
- (This was not possible in some older versions of MySQL.) In
- this case, MySQL creates a temporary table to hold the rows
- from the <literal role="stmt">SELECT</literal> and then
- inserts those rows into the target table. However, it
- remains true that you cannot use <literal>INSERT INTO t ...
- SELECT ... FROM t</literal> when <literal>t</literal> is a
+ (This was not possible in some older versions of MySQL.)
+ However, you cannot insert into a table and select from the
+ same table in a subquery.
+ </para>
+
+ <para>
+ When selecting from and inserting into a table at the same
+ time, MySQL creates a temporary table to hold the rows from
+ the <literal role="stmt">SELECT</literal> and then inserts
+ those rows into the target table. However, it remains true
+ that you cannot use <literal>INSERT INTO t ... SELECT ...
+ FROM t</literal> when <literal>t</literal> is a
<literal>TEMPORARY</literal> table, because
<literal>TEMPORARY</literal> tables cannot be referred to
twice in the same statement (see
@@ -1649,13 +1655,6 @@
<listitem>
<para>
- Currently, you cannot insert into a table and select from
- the same table in a subquery.
- </para>
- </listitem>
-
- <listitem>
- <para>
To avoid ambiguous column reference problems when the
<literal role="stmt">SELECT</literal> and the
<literal role="stmt">INSERT</literal> refer to the same
Modified: trunk/refman-5.5/sql-syntax-data-manipulation.xml
===================================================================
--- trunk/refman-5.5/sql-syntax-data-manipulation.xml 2010-04-26 08:18:36 UTC (rev 20223)
+++ trunk/refman-5.5/sql-syntax-data-manipulation.xml 2010-04-26 09:33:46 UTC (rev 20224)
Changed blocks: 2, Lines Added: 12, Lines Deleted: 13; 2184 bytes
@@ -1669,12 +1669,18 @@
<literal role="stmt">INSERT</literal> statement may appear
in the <literal>FROM</literal> clause of the
<literal role="stmt">SELECT</literal> part of the query.
- (This was not possible in some older versions of MySQL.) In
- this case, MySQL creates a temporary table to hold the rows
- from the <literal role="stmt">SELECT</literal> and then
- inserts those rows into the target table. However, it
- remains true that you cannot use <literal>INSERT INTO t ...
- SELECT ... FROM t</literal> when <literal>t</literal> is a
+ (This was not possible in some older versions of MySQL.)
+ However, you cannot insert into a table and select from the
+ same table in a subquery.
+ </para>
+
+ <para>
+ When selecting from and inserting into a table at the same
+ time, MySQL creates a temporary table to hold the rows from
+ the <literal role="stmt">SELECT</literal> and then inserts
+ those rows into the target table. However, it remains true
+ that you cannot use <literal>INSERT INTO t ... SELECT ...
+ FROM t</literal> when <literal>t</literal> is a
<literal>TEMPORARY</literal> table, because
<literal>TEMPORARY</literal> tables cannot be referred to
twice in the same statement (see
@@ -1699,13 +1705,6 @@
<listitem>
<para>
- Currently, you cannot insert into a table and select from
- the same table in a subquery.
- </para>
- </listitem>
-
- <listitem>
- <para>
To avoid ambiguous column reference problems when the
<literal role="stmt">SELECT</literal> and the
<literal role="stmt">INSERT</literal> refer to the same
Modified: trunk/refman-6.0/sql-syntax-data-manipulation.xml
===================================================================
--- trunk/refman-6.0/sql-syntax-data-manipulation.xml 2010-04-26 08:18:36 UTC (rev 20223)
+++ trunk/refman-6.0/sql-syntax-data-manipulation.xml 2010-04-26 09:33:46 UTC (rev 20224)
Changed blocks: 2, Lines Added: 9, Lines Deleted: 9; 1836 bytes
@@ -1663,12 +1663,17 @@
<literal role="stmt">INSERT</literal> statement may appear
in the <literal>FROM</literal> clause of the
<literal role="stmt">SELECT</literal> part of the query.
- (This was not possible in some older versions of MySQL.) In
- this case, MySQL creates a temporary table to hold the rows
+ (This was not possible in some older versions of MySQL.) However,
+ you cannot insert into a table and select from the same table in a
+ subquery.
+ </para>
+ <para>
+ When selecting from and inserting into a table at the same
+ time, MySQL creates a temporary table to hold the rows
from the <literal role="stmt">SELECT</literal> and then
inserts those rows into the target table. However, it
remains true that you cannot use <literal>INSERT INTO t ...
- SELECT ... FROM t</literal> when <literal>t</literal> is a
+ SELECT ... FROM t</literal> when <literal>t</literal> is a
<literal>TEMPORARY</literal> table, because
<literal>TEMPORARY</literal> tables cannot be referred to
twice in the same statement (see
@@ -1691,12 +1696,7 @@
</para>
</listitem>
- <listitem>
- <para>
- Currently, you cannot insert into a table and select from
- the same table in a subquery.
- </para>
- </listitem>
+
<listitem>
<para>
| Thread |
|---|
| • svn commit - mysqldoc@docsrva: r20224 - in trunk: refman-5.0 refman-5.1 refman-5.4 refman-5.5 refman-6.0 | jon.stephens | 26 Apr |