List:General Discussion« Previous MessageNext Message »
From:<sinisa Date:October 7 1999 3:34pm
Subject:Re: Column Defaults
View as plain text  
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       |
+----------------------------------------------------------------------+
Thread
Column Defaultsmblack7 Oct
  • Re: Column Defaultssinisa7 Oct
    • Re: Column Defaultsmblack7 Oct
      • Re: Column DefaultsMichael Widenius8 Oct
    • Re: Column DefaultsGerald Clark7 Oct