Possible Duplicate:
MySQL CURRENT_TIMESTAMP as DEFAULT
I am trying to create table as
CREATE TABLE myTable1
(
id INT,
date_validated TIMESTAMP,
date_registered TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP
);
however it is not working. I get error as
Incorrect table definition; there can be only one TIMESTAMP column
with CURRENT_TIMESTAMP in DEFAULT or ON UPDATE clause
When I switch the two timestamp statements (as shown below) then it is working.
CREATE TABLE myTable1
(
id INT,
date_registered TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
date_validated TIMESTAMP
);
Any idea why this is happening?
This is something strange for me and never experienced such problem.