At 5:18 PM -0700 8/23/01, Igbar Foosenhopper wrote:
>Is it possible to use current_date (mysql function) to generate a
>default for a column?
No. Defaults must be constants.
http://www.mysql.com/doc/C/R/CREATE_TABLE.html
>
>If so .. what would the syntax look like. I have tried several things
>and it doesn't seem to like it.
>
>If not .. how could I generate a default of todays date (of course
>dependent on the date of insert)?
Use a TIMESTAMP, which gets the current date and time automatically
if you set it to NULL or leave it out of the INSERT statement altogether.
Alternative, use a DATETIME and set it to NOW() when you insert a
record.
>
>Thanks
>
>
>
>
>--
>Best regards,
> Igbar mailto:[EMAIL PROTECTED]
--
Paul DuBois, [EMAIL PROTECTED]
---------------------------------------------------------------------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php