1,添加表字段

    alter table table1 add ptel varchar(100) not Null;

    alter table table1 add id int unsigned not Null auto_increment primary key;

    alter table table1 add tj int(1) not Nul default '1';

2,修改表字段

   alter table 表名称 change 字段名称 字段名称 字段类型 [是否允许非空];

   alter table 表名称 modify 字段名称 字段类型 [是否允许非空];

   alter table 表名称 modify 字段名称 字段类型 [是否允许非空];

3,删除表字段

    alter table table1 drop 字段名

上述来自玖乐网络(96net.com.cn)

相关文章:

  • 2022-03-07
  • 2021-08-25
  • 2022-12-23
  • 2021-12-24
  • 2021-08-05
  • 2021-09-07
  • 2021-05-18
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-11-06
  • 2022-12-23
  • 2022-12-23
  • 2021-11-17
相关资源
相似解决方案