增加字段:

1 alter table [tablename] add [字段名] [字段类型] first(首位);
2 
3 alter table [tablename] add [字段名] [字段类型] after [其他已有字段](后面);

删除字段:

1 alter table [tablename] drop [字段名]

修改字段:(改变)

1 alter table [tablename] change [已有字段名] [新字段名] [字段类型];

修改字段类型:(修改)

1 alter table [tablename] modify [已有字段名] [字段类型]

修改表名:

1 alter table [tablename] rename [new_tablename];

 

相关文章:

  • 2021-05-21
  • 2022-12-23
  • 2022-02-09
  • 2021-05-21
  • 2021-06-13
  • 2021-08-29
猜你喜欢
  • 2021-05-16
  • 2021-09-04
  • 2021-09-21
  • 2021-12-25
  • 2022-02-11
  • 2022-12-23
相关资源
相似解决方案