db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rick Hillegas <rick.hille...@oracle.com>
Subject Re: Migrating from MySQL to Apache - having difficulty with Timestamp.
Date Thu, 23 Jan 2014 20:51:03 GMT
On 1/23/14 11:41 AM, Paul Linehan wrote:
> 0000-00-00
> 00:00:00'
Hi Paul,

I see that the Reference Manual does not state that the year, month, and 
day fields of the timestamp must be positive integers. The following 
script shows this behavior:

connect 'jdbc:derby:memory:db;create=true';

create table t( a timestamp );

-- fails because year, month, and day must be positive integers
insert into t values ( '0000-00-00 00:00:00' );
insert into t values ( '0001-00-00 00:00:00' );
insert into t values ( '0001-01-00 00:00:00' );

-- succeeds
insert into t values ( '0001-01-01 00:00:00' );

select * from t;

Maybe the meaning of that MySQL timestamp is supposed to be equivalent 
to null?

Hope this helps,
-Rick

Mime
View raw message