修改表名:
//alter table 表名 rename to 新表名
alter table T rename to customer
修改字段名
//alter table 表名 change 旧表名 新表名 字段约束(如类型,primary key,not null)
alter table T change a b char(10)
本文介绍如何在数据库中修改表名和字段名,通过具体示例展示了使用SQL语句实现表名更名及字段名更改的方法。
修改表名:
//alter table 表名 rename to 新表名
alter table T rename to customer
修改字段名
//alter table 表名 change 旧表名 新表名 字段约束(如类型,primary key,not null)
alter table T change a b char(10)
374
2707

被折叠的 条评论
为什么被折叠?