Hi, there,
I have MySQL 4.1.10. I need to add a timestamp column to an existing
table. I am having a problem of setting the newly added column to be the
current time.
This is what I did:
CREATE TABLE try (id INTEGER); INSERT INTO try VALUES(1), (2), (3);
ALTER TABLE try ADD timestamp
I'd suggest not using the keyword timestamp as a column name. I'd
suggest using ts or tstamp or something like that.
To update the records to the current timestamp:
update try set tstamp=null;
should do it. I don't know why the default isn't working, though.
On Mon, 28 Feb 2005
Hi!
Am Mo, den 28.02.2005 schrieb Hank um 17:09: [top-posting reordered!]
On Mon, 28 Feb 2005 10:05:32 -0500, Zhe Wang [EMAIL PROTECTED] wrote:
Hi, there,
I have MySQL 4.1.10. I need to add a timestamp column to an existing
table. I am having a problem of setting the newly added column
Hi, Joerg,
Thank you very much for your clear reply. Now I completely understand
what is going on behind the screen.
Also a big thanks to all the people who gave me kind reply.
Regards,
Zhe
Joerg Bruehe wrote:
Hi!
Am Mo, den 28.02.2005 schrieb Hank um 17:09: [top-posting reordered!]
On