From derby-user-return-9604-apmail-db-derby-user-archive=db.apache.org@db.apache.org Fri Jul 25 13:49:51 2008 Return-Path: Delivered-To: apmail-db-derby-user-archive@www.apache.org Received: (qmail 33930 invoked from network); 25 Jul 2008 13:49:51 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 25 Jul 2008 13:49:51 -0000 Received: (qmail 85253 invoked by uid 500); 25 Jul 2008 13:49:49 -0000 Delivered-To: apmail-db-derby-user-archive@db.apache.org Received: (qmail 85231 invoked by uid 500); 25 Jul 2008 13:49:49 -0000 Mailing-List: contact derby-user-help@db.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: List-Id: Reply-To: "Derby Discussion" Delivered-To: mailing list derby-user@db.apache.org Received: (qmail 85220 invoked by uid 99); 25 Jul 2008 13:49:49 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 25 Jul 2008 06:49:49 -0700 X-ASF-Spam-Status: No, hits=2.6 required=10.0 tests=DNS_FROM_OPENWHOIS,SPF_HELO_PASS,SPF_PASS,WHOIS_MYPRIVREG X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of lists@nabble.com designates 216.139.236.158 as permitted sender) Received: from [216.139.236.158] (HELO kuber.nabble.com) (216.139.236.158) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 25 Jul 2008 13:48:54 +0000 Received: from isper.nabble.com ([192.168.236.156]) by kuber.nabble.com with esmtp (Exim 4.63) (envelope-from ) id 1KMNfa-0001Sc-EU for derby-user@db.apache.org; Fri, 25 Jul 2008 06:49:18 -0700 Message-ID: <18652114.post@talk.nabble.com> Date: Fri, 25 Jul 2008 06:49:18 -0700 (PDT) From: Mark P Ashworth To: derby-user@db.apache.org Subject: Re: Alter TIMESTAMP field default after creation does not work In-Reply-To: <4889D4DC.8050809@sun.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Nabble-From: info@connext.co.za References: <18650021.post@talk.nabble.com> <4889D4DC.8050809@sun.com> X-Virus-Checked: Checked by ClamAV on apache.org Good Day, Thank you for the reply. I am just a bit concerned upgrading because a release in 10.3.x is marked with causing database corruption and so far Derby has been relatively stable. Regards, Mark P Ashworth Rick Hillegas-2 wrote: > > Hi Mark, > > I find that this fails for me too when using the 10.2 series of > releases. However, the experiment succeeds when I use the 10.3 and 10.4 > releases. > > Regards, > -Rick > > Mark P Ashworth wrote: >> Good Day, >> >> Derby version: 10.2.2.0 >> >> As part of the database data upgrade process I need to do the following >> so >> that the existing rows get a NULL for the column but all new rows will >> get >> the default of the current timestamp. >> >> CREATE TABLE X ( >> FIELD INT >> ) >> >> ALTER TABLE X ADD COLUMN FIELD_DATE TIMESTAMP >> >> ALTER TABLE X ALTER FIELD_DATE DEFAULT CURRENT_TIMESTAMP >> >> Regards, >> Mark P Ashworth >> > > > -- View this message in context: http://www.nabble.com/Alter-TIMESTAMP-field-default-after-creation-does-not-work-tp18650021p18652114.html Sent from the Apache Derby Users mailing list archive at Nabble.com.