List:General Discussion« Previous MessageNext Message »
From:Jay Miller Date:May 4 1999 5:29pm
Subject:RE: Default = Now()
View as plain text  
A timestamp will not work here because I only want it set to the current
time on INSERT, not on UPDATE.

> -----Original Message-----
> From: Eric Savage [mailto:esavage@stripped]
> Sent: Tuesday, May 04, 1999 12:27 PM
> To: Jay Miller
> Subject: Re: Default = Now()
>
>
> Use the timestamp field type (see the manual for details).
>
> Eric Savage
> esavage@stripped
>
> >
> > 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
> >
> >
> > ---------------------------------------------------------------------
> > Please check
"http://www.mysql.com/Manual_chapter/manual_toc.html" before
> posting. To request this thread, e-mail mysql-thread2858@stripped
>
> To unsubscribe, send a message to the address shown in the
> List-Unsubscribe header of this message. If you cannot see it,
> e-mail mysql-unsubscribe@stripped instead.
>

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