Return-Path: Delivered-To: apmail-db-derby-user-archive@www.apache.org Received: (qmail 31199 invoked from network); 31 Aug 2006 12:04:52 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 31 Aug 2006 12:04:52 -0000 Received: (qmail 35194 invoked by uid 500); 31 Aug 2006 12:04:52 -0000 Delivered-To: apmail-db-derby-user-archive@db.apache.org Received: (qmail 34807 invoked by uid 500); 31 Aug 2006 12:04:51 -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 34796 invoked by uid 99); 31 Aug 2006 12:04:51 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 31 Aug 2006 05:04:51 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of duncangroenewald@xtra.co.nz designates 210.54.141.244 as permitted sender) Received: from [210.54.141.244] (HELO fep02.xtra.co.nz) (210.54.141.244) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 31 Aug 2006 05:04:50 -0700 Received: from [219.89.237.35] by fep02.xtra.co.nz with ESMTP id <20060831120428.YBYD28703.fep02.xtra.co.nz@[219.89.237.35]> for ; Fri, 1 Sep 2006 00:04:28 +1200 Message-ID: <44F6D056.2020305@xtra.co.nz> Date: Fri, 01 Sep 2006 00:04:38 +1200 From: Duncan Groenewald User-Agent: Thunderbird 1.5.0.5 (Windows/20060719) MIME-Version: 1.0 To: Derby Discussion Subject: Re: SQL Parser failing on NULL column contraint References: <44F3087F.1020006@intland.com> <44F34597.4090902@gmail.com> <44F587AA.8060007@xtra.co.nz> <44F5AE95.2010907@amberpoint.com> <44F67DEB.2040103@xtra.co.nz> <44F6B856.9070503@xtra.co.nz> In-Reply-To: <44F6B856.9070503@xtra.co.nz> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Thanks, you've been most helpful. I'll switch to the standard and change the sybase config in future... I guess I'll never get to figure out how a sql parser works now. Duncan Bernt M. Johnsen wrote: > Duncan Groenewald wrote: > >> Point 5 is the reason, one of the databases I use does not handle no >> definition and requires a NULL or NOT NULL definition. But its been a >> long time since I checked this so the newer version may be more >> compliant. I'll check before I waste any more time on this. >> >> Interestingly derby is the first database I have encountered(I think) >> that throws an error on a NULL definition. >> > > I did a brief survey on the net, and found that MySQL, Sybase, > PostgreSQL, HSQLDB, H2, Oracle and SQLServer allows the user to > specify the non-standard "constraint" NULL. PostgreSQL has the most > sensible note in the docs: > > "This clause is only available for compatibility with non-standard SQL > databases. Its use is discouraged in new applications." > > DB2 and Derby does not allow NULL. > > And Sybase defaults to NOT NULL (in default configuration and as you > point out in another mail) which is definitely against the SQL > standard, and that means that portable CREATE TABLE statements will > not work on Sybase (even if they do syntactically). > > And, you can't write SQL which is compatible between Sybase (in > default configuration) and Derby (or DB2 for that matter). > >