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
Log:
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

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>
 </ul></p></section>
 <section><title>Syntax</title><codeblock><b>ALTER TABLE <i><xref
href="rreftablename.dita#rreftablename">tableName</xref></i>
 {
-    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
| RESTRICT ] |
@@ -62,24 +62,6 @@ href="rrefconstraintname.dita#rrefconstr
     ALTER [ COLUMN ] <i><xref href="rrefsqlj81859.dita#rrefsqlj81859/rrefsqlj37860">columnAlteration</xref></i>
|
     LOCKSIZE { ROW | TABLE }
 }</b></codeblock></section>
-<example id="rrefaltercolumndef"> <title>columnDefinition</title><codeblock><b><i><xref
-href="rrefsimplecolumnname.dita#rrefsimplecolumnname">simpleColumnName</xref></i>
[ <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>
-]</b></codeblock>
-<p>The syntax for the <i>columnDefinition</i> for a new column is a subset
of
-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>
can
-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
a
-<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
if
 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
-href="rrefsqlj81859.dita#rrefsqlj81859/rrefaltercolumndef">columnDefinition</xref
-></i> for a new column is almost the same as for a column in a CREATE TABLE
+href="rrefsqlj30540.dita#rrefsqlj30540">columnDefinition</xref
+></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,



Mime
View raw message