"Martijn Tonies" <[EMAIL PROTECTED]> wrote on 03/14/2006 01:16:11 PM:

> Hello Bruno,
> 
> > well about the date default value being invalid, well it´s working 
here in
> > my system (MySQL 4.1.16, Mac OS X 10.4.5), and all my systens work 
with
> > this...
> 
> Yes, it's a valid value in MySQL, but it's an invalid date,
> that's what I'm trying to say. Why have an invalid date
> as the default?
> 
> 
> Martijn Tonies
> Database Workbench - development tool for MySQL, and more!
> Upscene Productions
> http://www.upscene.com
> My thoughts:
> http://blog.upscene.com/martijn/
> Database development questions? Check the forum!
> http://www.databasedevelopmentforum.com
> 

Martin,

If you used MySQL just a bit more often for day-to-day operations (yes, we 
all know that you build useful tools that interoperate with several RDBM 
systems), you would know that you cannot assign anything but constant 
values as default values for any type of column in MySQL (timestamp being 
the singular, partial exception). That means you cannot design a column to 
have more meaningful default date by capturing the current time because 
functions are not permitted as default values (yet). 

With that in mind, a design default of "0000-00-00" is as good as any 
other single, randomly chosen default date, don't you think? That's also 
the "default" default date if you define a non-null date column and do not 
specify your own default in the definition.


Shawn Green
Database Administrator
Unimin Corporation - Spruce Pine

Reply via email to