The TIMESTAMP column type does this for you: See: http://www.mysql.com/doc/en/DATETIME.html
Regards, Mike Hillyer www.vbmysql.com > -----Original Message----- > From: MaFai [mailto:[EMAIL PROTECTED] > Sent: Tuesday, June 24, 2003 11:01 AM > To: [EMAIL PROTECTED] > Subject: datetime column dummy question > > > Hello, mysql, > > A table contains a column named "mydate". > > //Wrong sql statement > alter table p_asset add mydate datetime default now(); > alter table p_asset add mydate datetime default time(); > alter table p_asset add mydate datetime default now; > alter table p_asset add mydate datetime default time; > alter table p_asset add mydate datetime default date(); > alter table p_asset add mydate datetime default datetime(); > > > How can I add the default now value into the specified column? > I try to find in the mysql manual,but in the default > value charter,no relative information can be found. > > I also know this question is stupid,but hope you help. > > > > > Best regards. > > MaFai > [EMAIL PROTECTED] > 2003-06-25 > > -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]