You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-commits@db.apache.org by ch...@apache.org on 2009/01/21 20:47:07 UTC

svn commit: r736390 - /db/derby/docs/trunk/src/ref/rrefsqlj81859.dita

Author: chaase3
Date: Wed Jan 21 11:47:06 2009
New Revision: 736390

URL: http://svn.apache.org/viewvc?rev=736390&view=rev
Log:
DERBY-4016: Document syntax change for ALTER TABLE in Reference Manual

This patch updates the ALTER TABLE topic to reflect the changes made for DERBY-4013.

Patch: DERBY-4016.diff

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=736390&r1=736389&r2=736390&view=diff
==============================================================================
--- db/derby/docs/trunk/src/ref/rrefsqlj81859.dita (original)
+++ db/derby/docs/trunk/src/ref/rrefsqlj81859.dita Wed Jan 21 11:47:06 2009
@@ -75,7 +75,8 @@
 <i>column-name</i> SET INCREMENT BY integer-constant |
 <i>column-name</i> RESTART WITH integer-constant |
 <i>column-name</i> [ NOT ] NULL |
-<i>column-name</i> [ WITH ] DEFAULT default-value</b> </codeblock></example>
+<i>column-name</i> [ WITH | SET ] DEFAULT default-value |
+<i>column-name</i> DROP DEFAULT</b> </codeblock></example>
 <section><p>In the column-alteration, SET INCREMENT BY integer-constant, specifies
 the interval between consecutive values of the identity column. The next value
 to be generated for the identity column will be determined from the last assigned
@@ -198,7 +199,10 @@
         there must not be existing NULL values for the column in the table.</p>
     <p>You can remove the NOT NULL constraint from an existing column. To do
         so the column must not be used in a PRIMARY KEY constraint.</p></li>
-<li>Changing the default value for a column.</li>
+<li>Changing the default value for a column.
+<p>You can use DEFAULT default-value to change a column default. To disable a
+previously set default, use DROP DEFAULT (alternatively, you can specify NULL as
+the default-value).</p></li>
 </ul></p></section>
 <section><title>Setting defaults</title><p>You can specify a default value
 for a new column. A default value is the value that is inserted into a column
@@ -272,7 +276,7 @@
 
 <ph>-- Change the default value for the SALARY column</ph>
 ALTER TABLE Employees ALTER COLUMN Salary DEFAULT 1000.0
-
+ALTER TABLE Employees ALTER COLUMN Salary DROP DEFAULT
 </b></codeblock></section>
 <section><title>Results</title><p>An ALTER TABLE statement causes all statements
 that are dependent on the table being altered to be recompiled before their