0

我在 Amazon Web Service (AWS) 关系数据库服务 (RDS) 中有一个表,表列是“Memory”、“Cores”、“Speed”和“Insert_Timestamp”,我试图让数据库每次都记录一个新行被添加到该表中。话虽如此,我正在运行以下代码Alter table Instace_Types ALTER COLUMN Insert_Timestamp SET DEFAULT CURRENT_TIMESTAMP。我遇到了这个错误:

 "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'COLUMN Insert_Timestamp SET DEFAULT CURRENT_TIMESTAMP' at line 1" 

任何投入将不胜感激。

4

1 回答 1

0

第二个ALTER应该是CHANGE.

Alter table Instance_Types 
     CHANGE Insert_Timestamp 
            Insert_Timestamp TIMESTAMP DEFAULT CURRENT_TIMESTAMP
于 2014-06-10T20:04:21.087 回答