通过使用ALTER命令,我们可以将列添加到现有表中。
Alter table table-name ADD (column-name datatype);
在下面的示例中,借助ALTER Command,列'GRADE'被添加到表'Student'。
mysql> Alter table Student ADD (Grade Varchar(10)); Records: 5 Duplicates: 0 Warnings: 0