List:General Discussion« Previous MessageNext Message » Date:April 10 2006 12:09pm
Subject:Re: timestamp & not null
View as plain text  
  I need to create a "commands" table. A program will periodically check on this table
there's a pending command for it to execute or not. Whatever the reason, this program
might read a command but not acknowledge it's 
  Other program will check out whether the command timeout has expired or not and so act
  I guess I can use some sort of integer in order to represent it as a unix timestamp, but
I would prefer to use a "timestamp".

  Any suggestions?
  Kind regards

----Mensaje original----
De: m.tonies@stripped
Recibido: 10/04/2006 11:51
Para: <TEIXOEIRA@stripped>, <mysql@stripped>
Asunto: Re: timestamp &amp; not null


> I created a table and, into it, a timestamp field:
> When I issue the command "describe" it shows the field "expires" allows
nulls and defaults to CURRENT_TIMESTAMP. Also, each time I update
> a field other than "expires" in this table, "expires" gets updated to the
current timestamp.
> Does anybody know how can I make a timestamp field be "not null"?
> Lots of thanks to you all.

If you want to store date/time values, do not use the TIMESTAMP

What is it that you're trying to do?

Martijn Tonies
Database Workbench - development tool for MySQL, and more!
Upscene Productions
My thoughts:
Database development questions? Check the forum!

Prueba el Nuevo Correo Terra; Seguro, Rápido, Fiable.

timestamp & not nullTEIXOEIRA@terra.es10 Apr
  • Re: timestamp & not nullMartijn Tonies10 Apr
Re: timestamp & not nullTEIXOEIRA@terra.es10 Apr
  • Re: timestamp & not nullMartijn Tonies10 Apr