mysql在已有表中添加一个字段

举例子,代码如下:

alter table teacher add gradeId int(11) ;              alter英文意思是改变

如果表中已经有了数据,则不能添加主键或者外键,因为主键或外键不能为空。e

猜你喜欢

转载自blog.csdn.net/qq_41857764/article/details/85342216