2019-07-19
阅读量:
1057
MySQL怎么增加字段?
问:MySQL怎么增加字段?
答:
语法:alter table+表名+add+新字段+新字段属性
–例:在数据表 tb_department 中添加一个 int 类型的字段 managerid(部门经理编号)
alter table tb_deptment add managerid int(10);
–例:在数据表 tb_department 中添加一个不能为空的 varchar(12)类型的字段 column1
alter table tb_deptment add column1 varchar(12) not null;






评论(0)


暂无数据
推荐帖子
0条评论
1条评论
0条评论