Page 1 of 1

problem in create table

Posted: Mon May 09, 2005 2:39 am
by itsmani1
hi there....

Code: Select all

CREATE TABLE t
(
  ts1 TIMESTAMP NULL DEFAULT NULL,
  ts2 TIMESTAMP NULL DEFAULT 0,
  ts3 TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP
);
see the above coad ...
what i want to do is : just to create a table where on evey insertion or updation it just maintain its current date and time? my question is that on whic version of mysql above query will work and my 2nd question is : is above code corrent and will it work?

Regards...

Posted: Mon May 09, 2005 9:35 am
by anjanesh
Chenge to datetime.

Code: Select all

CREATE TABLE `t` (
  `ts1` datetime default NULL,
  `ts2` datetime default NULL,
  `ts3` datetime default NULL
) TYPE=MyISAM;