Jesse, a TIMESTAMP column in your table can be set to have the 'now' value when a row is inserted, or updated, or both.

http://dev.mysql.com/doc/refman/5.0/en/timestamp-4-1.html

Note the warning about TIMESTAMP behavior differing significantly prior to 4.1.

Dan


Jesse wrote:
What is the best way to default a date/time field to the current date/time? I've tried using Now(), but I get an error of course. The only other way I know of to do this is to add a trigger, which I can do, but I find them bothersome, because they don't tend to backup and restore properly. Is there another way to do this?

Thanks,
Jesse


--
Dan Buettner

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to