我在Amazon Web Service(AWS)关系数据库服务(RDS)中有一个表,表列是" Memory"," Cores"," Speed&# 34;和" 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"
任何输入都将不胜感激。
答案 0 :(得分:0)
第二个ALTER
应为CHANGE
。
Alter table Instance_Types
CHANGE Insert_Timestamp
Insert_Timestamp TIMESTAMP DEFAULT CURRENT_TIMESTAMP