mblack writes:
> Is it possible to set the default of a column to the result of a function
> when creating or altering a table?
>
> Ex: date_created datetime default SYSDATE(),
> --
> Michael Black, Senior Consultant
> CRM and ERM Specialist
> Information Management Systems Consulting, Inc.
> www.imsconsulting.com
> 18500 Von Karman, Suite 540
> Irvine, CA 92612 USA
> Voice 877.756.5757
> Fax 949.862.5600
>
>
>
>
HI!
No, there is no general feature like that, but for your example there
is a column type of TIMESTAMP.
Read about it in a manual.
Sinisa
+----------------------------------------------------------------------+
| TcX ____ __ _____ _____ ___ == mysql@stripped |
| /*/\*\/\*\ /*/ \*\ /*/ \*\ |*| Sinisa Milivojevic |
| /*/ /*/ /*/ \*\_ |*| |*||*| mailto:sinisa@stripped|
| /*/ /*/ /*/\*\/*/ \*\|*| |*||*| Larnaka, Cyprus |
| /*/ /*/ /*/\*\_/*/ \*\_/*/ |*|____ |
| ^^^^^^^^^^^^/*/^^^^^^^^^^^\*\^^^^^^^^^^^ |
| /*/ \*\ Developers Team |
+----------------------------------------------------------------------+