Re: datetime column dummy question

2003-07-19 Thread Paul DuBois
At 23:10 -0500 6/24/03, MaFai wrote: 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 de

RE: datetime column dummy question

2003-06-25 Thread Mike Hillyer
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 dumm

Re: datetime column dummy question

2003-06-25 Thread Nils Valentin
Also doesnt work in 4.1 alpha. Best regards Nils Valentin Tokyo/Japan (As requested I took Roman of , as he doesnt like direct e-mails ;-) 2003年 6月 25日 水曜日 19:12、Roman Neuhauser さんは書きました: > # [EMAIL PROTECTED] / 2003-06-25 06:18:04 +0100: > > Sometime recently MaFai said: > > > A table contai

Re: datetime column dummy question

2003-06-25 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2003-06-25 07:10:46 +0100: > Sometime recently Roman Neuhauser said: > > # [EMAIL PROTECTED] / 2003-06-25 06:18:04 +0100: > > > alter table p_asset add mydate datetime default 'now()'; > > > > > > - you need the '' around now(); apparently > > > > > > http://www.mysql.com/d

Re: datetime column dummy question

2003-06-25 Thread Janice Wright
You're right, just tested it myself on 3.23.41; and I get exactly the same result as you. We should post an amendment to the docs on the website. However, (still with 3.23.41): mysql> create table autotime2 (foo int, bar timestamp default now()); ERROR 1064: You have an error in your SQL syntax

Re: datetime column dummy question

2003-06-25 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2003-06-25 06:18:04 +0100: > Sometime recently MaFai said: > > 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(); >

Re: datetime column dummy question

2003-06-25 Thread Janice Wright
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.ingentase

Re: datetime column dummy question

2003-06-25 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2003-06-25 12:05:49 +0800: > //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 myda