List:General Discussion« Previous MessageNext Message »
From:Jay Miller Date:May 4 1999 5:19pm
Subject:Default = Now()
View as plain text  
I am trying to migrate tables from Microsoft Access to MySQL.  I have some
tables with date fields and a default value of Now().  Of course,

CREATE TABLE mytable (
	field1 date NOT NULL DEFAULT Now()
);

does not work in MySQL.  There are many areas that update these tables, so
modifying all of the code to just insert the current date would be very time
consuming (I didn't write this code, I inherited it).  Can anyone think of
anyway I can set the default value of a date field to be the current time ON
THE DATABASE LEVEL?

Thanks,

Jay Miller
Socket Internet Services
Columbia, MO, US

Thread
Default = Now()Jay Miller4 May
RE: Default = Now()Jay Miller4 May
  • Re: Default = Now()Fred Read5 May