List:General Discussion« Previous MessageNext Message »
From:Paul DuBois Date:March 8 2002 12:30am
Subject:Re: NULL timestamps not possible?
View as plain text  
At 16:10 -0800 3/7/02, Shankar Unni wrote:
>I tried setting a TIMESTAMP column (nullable, not first timestamp in 
>that table) in mysql 3.23.38) to NULL, but it seems to get the value 
>00000000000000.  Is it not possible to set a timestamp column to 
>NULL?

It is not possible.  Setting a TIMESTAMP to NULL in MySQL is idiomatic
for "set it to the current date and time".  Much like setting an
AUTO_INCREMENT value to NULL is idiomatic for "set it to the next
sequence value."

I'm surprised that you're finding the column set to 00000000000000,
however.  It should get the current date and time.

>--
>Shankar.

Thread
NULL timestamps not possible?Shankar Unni8 Mar
  • Re: NULL timestamps not possible?Paul DuBois8 Mar
  • Re: NULL timestamps not possible?Shankar Unni8 Mar
    • Re: NULL timestamps not possible?Paul DuBois8 Mar
  • Re: NULL timestamps not possible?Shankar Unni8 Mar
    • RE: NULL timestamps not possible?Al Caponi8 Mar
    • Re: NULL timestamps not possible?Michael Stassen8 Mar