RE: [win32,mysql v. 3.23.32]Now() function and ERROR in enum

2001-02-08 Thread Carsten H. Pedersen
> I tried the following code: > > CREATE TABLE news (... published date DEFAULT 'NOW()' NOT NULL, > ..., showIt ENUM('TRUE') DEFAULT ERROR, ...); > > and I was surprised to get an '-00-00' as date after doing a > SELECT. I would like that the table put automatically the today's > date for

Re: [win32,mysql v. 3.23.32]Now() function and ERROR in enum

2001-02-08 Thread John Cichy
Christian, a DEFAULT value in a CREATE (or ALTER) statement must be a static value, try using a TIMESTAMP field instead. To use 'ERROR' in as an 'ENUM' DEFAULT it must be included in the definition, i.e. ENUM('ERROR','TRUE') Hope this helps... John On Thursday 08 February 2001 09:09, Christi