lanyincao


修改字段类型(数据类型,长度,默认值)

alter table user modify user_name 类型   

 

修改字段名

方法一:alter table 表 change 旧字段名  新字段名  新数据类型
例如  alter table user change user_name user_name1 varchar(10)

方法二:alter table 表名 rename column z to x
例如:  alter table user rename column user_name to user_name1

 

分类:

技术点:

相关文章:

  • 2021-08-11
  • 2021-11-30
  • 2021-11-17
  • 2021-11-30
  • 2021-11-20
  • 2021-04-03
猜你喜欢
  • 2021-12-08
  • 2021-11-20
相关资源
相似解决方案