Hi,

Try this:

To modify an existing field:
 ALTER TABLE doc MODIFY docts timestamp DEFAULT CURRENT_TIMESTAMP;

or

To add new field
ALTER TABLE doc ADD docts timestamp DEFAULT CURRENT_TIMESTAMP;

Thanks,
ViSolve DB Team.

----- Original Message ----- 
From: "Peter Lauri" <[EMAIL PROTECTED]>
To: <mysql@lists.mysql.com>
Sent: Sunday, August 27, 2006 8:27 PM
Subject: ALTER TABLE


> Hi,
> 
> 
> 
> I am doing this thru the phpmyadmin interface:
> 
> 
> 
> ALTER TABLE doc ALTER docts SET DEFAULT CURRENT_TIMESTAMP
> 
> 
> 
> However, it returns #1064 - You have an error in your SQL syntax near
> 'DEFAULTCURRENT_TIMESTAMP' at line 1
> 
> 
> 
> As you can see the error shows that DEFAULT an CURRENT_TIMESTAMP has been
> written together, strange, or is my syntax in the ALTER TABLE wrong?
> 
> 
> 
> /Peter
> 
> 
> 
> 
> 
> 
> 
>

Reply via email to