举例子,代码如下:
alter table teacher add gradeId int(11) ; alter英文意思是改变
如果表中已经有了数据,则不能添加主键或者外键,因为主键或外键不能为空。e