db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Duncan Groenewald <duncangroenew...@xtra.co.nz>
Subject Re: SQL Parser failing on NULL column contraint
Date Thu, 31 Aug 2006 12:04:38 GMT
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.


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).

View raw message