List:General Discussion« Previous MessageNext Message »
From:Jay Miller Date:August 17 1999 3:11pm
Subject:RE: CurDate as DEFAULT Value
View as plain text  
A timestamp is NOT what he is looking for.  A timestamp field is updated
every time an UPDATE statement is issued.  He is looking for a time created
stamp that never changes no matter how often the row is updated.

What you are looking for is not available through MySQL at this time.  Monty
says that this may be possible in a later 3.23.x release.

> -----Original Message-----
> From: aaron abelard [mailto:aaron@stripped]
> Sent: Tuesday, August 17, 1999 9:54 AM
> To: Juergen Hoffmann; mysql@stripped
> Subject: Re: CurDate as DEFAULT Value
>
>
> Quoting Juergen Hoffmann (jh@stripped):
> >
> > i mean a field in which the current date is entered by default,
> so you can
> > seee when this record was initially entered and not last modified... ;-)
> >
>
> That's how it works.
>
> mysql> create table test1 (
>     ->    idx int not null auto_increment primary key,
>     ->    created timestamp(14)
>     -> );
> Query OK, 0 rows affected (0.28 sec)
>
> mysql> insert into test1 values ( 0, NULL );
> Query OK, 1 rows affected (0.01 sec)
>
> mysql> select * from test1;
> 1 rows in set (0.01 sec)
>
> +-----+----------------+
> | idx | created        |
> +-----+----------------+
> |   1 | 19990817095233 |
> +-----+----------------+
>
> I think that'll do what you want.
>
> a.
>
> ---------------------------------------------------------------------
> Please check "http://www.mysql.com/Manual_chapter/manual_toc.html" before
> posting. To request this thread, e-mail mysql-thread10445@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
CurDate as DEFAULT ValueJuergen Hoffmann17 Aug
  • CurDate as DEFAULT Valuesinisa17 Aug
    • Re: CurDate as DEFAULT Valueaaron abelard17 Aug
      • Re: CurDate as DEFAULT ValueMartin Ramsch17 Aug
        • Re: CurDate as DEFAULT ValueJuergen Hoffmann17 Aug
          • Re: CurDate as DEFAULT Valueaaron abelard17 Aug
            • RE: CurDate as DEFAULT ValueJay Miller17 Aug
              • RE: CurDate as DEFAULT ValueUrb LeJeune17 Aug
                • Re: CurDate as DEFAULT Value(Chris Adams)17 Aug
              • Re: CurDate as DEFAULT Valueaaron abelard17 Aug
              • Re: CurDate as DEFAULT Value(Sean McKenna)17 Aug
                • Re: CurDate as DEFAULT ValueJuergen Hoffmann17 Aug
              • RE: CurDate as DEFAULT ValueMichael Widenius22 Aug
          • Re: CurDate as DEFAULT ValueMartin Ramsch17 Aug
        • Re: CurDate as DEFAULT Valueaaron abelard17 Aug