At 11:57 AM +0200 6/28/01, Kaneda K wrote:
>At 10:38 27/06/2001 -0700, you wrote:
>>Sorry, for quoting the manual but this might be just another example where
>>it could have the answer right away:
>On my own mysql version :
> Date TIMESTAMP default "now()",
>Works correctly, the date is YYYYMMDDHHmmss format, but the values
>are set automattically and correctly, so, could it be your mysql
It works as you seem to expect, but not for the reason you think.
If you try SHOW COLUMNS FROM tbl_name, I expect you'll find that MySQL
ignored your default value specification and set it to NULL.
In any case "now()" is a string, not a function call. What you've
really attempted to do is set the default value to a literal string,
not a function that evaluates to the current date and time.
>System Info :
>Red Hat Linux release 6.2 (Zoot)
> Kernel 2.2.14-5.0 on an i686
>Mysql Ver 11.12 Distrib 3.23.32
>java version "1.3.0"
> Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.0)
> Java HotSpot(TM) Client VM (build 1.3.0, mixed mode)
>JDBC Driver : mm.mysql-2.0.4-bin.jar
>Tomcat 3.2 beta 3
Paul DuBois, paul@stripped