db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kahat...@apache.org
Subject svn commit: r1626963 - /db/derby/docs/trunk/src/ref/rrefsqlj81859.dita
Date Tue, 23 Sep 2014 08:22:36 GMT
Author: kahatlen
Date: Tue Sep 23 08:22:35 2014
New Revision: 1626963

URL: http://svn.apache.org/r1626963
DERBY-3888: ALTER TABLE ... ADD COLUMN cannot add identity columns

Update the syntax description to show that adding identity columns
with ALTER TABLE is allowed.


Modified: db/derby/docs/trunk/src/ref/rrefsqlj81859.dita
URL: http://svn.apache.org/viewvc/db/derby/docs/trunk/src/ref/rrefsqlj81859.dita?rev=1626963&r1=1626962&r2=1626963&view=diff
--- db/derby/docs/trunk/src/ref/rrefsqlj81859.dita (original)
+++ db/derby/docs/trunk/src/ref/rrefsqlj81859.dita Tue Sep 23 08:22:35 2014
@@ -46,7 +46,7 @@ column</li>
 <section><title>Syntax</title><codeblock><b>ALTER TABLE <i><xref
-    ADD COLUMN <i><xref href="rrefsqlj81859.dita#rrefsqlj81859/rrefaltercolumndef">columnDefinition</xref></i>
+    ADD COLUMN <i><xref href="rrefsqlj30540.dita#rrefsqlj30540">columnDefinition</xref></i>
     ADD <i><xref href="rrefsqlj13590.dita#rrefsqlj13590">CONSTRAINT clause</xref></i>
     DROP [ COLUMN ] <i><xref
 href="rrefcolumnname.dita#rrefcolumnname">columnName</xref></i> [ CASCADE
@@ -62,24 +62,6 @@ href="rrefconstraintname.dita#rrefconstr
     ALTER [ COLUMN ] <i><xref href="rrefsqlj81859.dita#rrefsqlj81859/rrefsqlj37860">columnAlteration</xref></i>
-<example id="rrefaltercolumndef"> <title>columnDefinition</title><codeblock><b><i><xref
[ <i>dataType</i> ]
-[ <i><xref href="rrefsqlj16095.dita#rrefsqlj16095">columnLevelConstraint</xref></i>
-[ [ WITH ] DEFAULT <varname>defaultConstantExpression</varname>
-  | <i><xref href="rrefsqljgenerationclause.dita#rrefsqljgenerationclause">generationClause</xref></i>
-<p>The syntax for the <i>columnDefinition</i> for a new column is a subset
-the syntax for a column in a
-<xref href="rrefsqlj24513.dita#rrefsqlj24513">CREATE TABLE statement</xref>.</p>
-<p>The syntax of <i>DataType</i> is described in
-<xref href="crefsqlj31068.dita#crefsqlj31068"></xref>. The <i>DataType</i>
-be omitted only if you specify a <i>generationClause</i>. If you omit the
-<i>DataType</i>, the type of the generated column is the type of the
-<i>generationClause</i>. If you specify both a <i>DataType</i> and
-<i>generationClause</i>, the type of the <i>generationClause</i>
must be
-assignable to <i>DataType</i>.</p>
-<p>For details on <varname>defaultConstantExpression</varname>, see 
-<xref href="rrefsqlj30540.dita#rrefsqlj30540/sqlj64478">Column default</xref>.</p></example>
 <example id="rrefsqlj37860"><title>columnAlteration</title>
 <codeblock><b><i>columnName</i> SET DATA TYPE BLOB( <i>integer</i>
) |
 <i>columnName</i> SET DATA TYPE CLOB( <i>integer</i> ) |
@@ -125,8 +107,8 @@ not assignable from the type of the <i>g
 <ph conref="../conrefs.dita#prod/productshortname"></ph> also raises an error
 you try to add a DEFAULT clause to a generated column.</p></section>
 <section><title>Adding columns</title><p>The syntax for the <i><xref
-></i> for a new column is almost the same as for a column in a CREATE TABLE
+></i> for a new column is the same as for a column in a CREATE TABLE
 statement. This syntax allows a column constraint to be placed on the new column within
 the ALTER TABLE ADD COLUMN statement. However, a column with a NOT NULL constraint
 can be added to an existing table if you give a default value; otherwise,

View raw message