1.添加字段:

alter table  表名  add (字段  字段类型)  [ default  '输入默认值']  [null/not null]  ;

2.添加备注:

comment on column  库名.表名.字段名 is  '输入的备注';  如: 我要在ers_data库中  test表 document_type字段添加备注  comment on column ers_data.test.document_type is '文件类型';

3.修改字段类型:

alter table 表名  modiy (字段  字段类型  [default '输入默认值' ] [null/not null]  ,字段  字段类型  [default '输入默认值' ] [null/not null] ); 修改多个字段用逗号隔开

4.删除字段:

alter table  表名  drop (字段);

本文转载自:https://www.cnblogs.com/kobigood/p/6293955.html

相关文章:

  • 2022-12-23
  • 2022-02-14
  • 2022-12-23
  • 2021-12-22
猜你喜欢
  • 2022-02-09
  • 2021-10-12
  • 2021-12-12
  • 2022-12-23
  • 2021-07-30
  • 2021-11-28
相关资源
相似解决方案