我在亚马逊网络服务(AWS)关系数据库服务(RDS)中有一个表,表列是"内存","核心","速度"one_answers"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"
第二个ALTER
应该是CHANGE
。
Alter table Instance_Types
CHANGE Insert_Timestamp
Insert_Timestamp TIMESTAMP DEFAULT CURRENT_TIMESTAMP