alter table p_asset add mydate datetime default 'now()';
- you need the '' around now(); apparently http://www.mysql.com/doc/en/DATETIME.html and scroll down to the comment made by Lazy Soul on Tuesday May 27 2003, @8:15am Jan Janice Wright Ingenta plc [EMAIL PROTECTED] http://www.ingentaselect.com/ Sometime recently MaFai said: > 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] -- Janice Wright Ingenta plc [EMAIL PROTECTED] Tel: +44 (0) 01865 799114 http://www.ingentaselect.com/ -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]