alter,alter官网
更改表字段类型
alter table 表名 modify 字段 改后的字段类型
更改表名
alter table 表名 rename to 表名2
添加表字段
alter table 表名 add 字段 类型
(字段1 类型1,字段2 类型2)
删除表字段
alter table 表名 drop column 字段
更改表字段名
alter table 表名 rename column 字段 to 字段2
添加一个分区
alter table tb_kr_voice_summary_01_day add partition DATA_20110707 values ('20110707');
更改表空间名称
alter tablespace XXX rename to XXXX;
表结构改变的时候,比如添加列alter table 表名 add 列名 类型,修改列alter table 表名 modify(列名 类型) ,添加约束alter table 表名
add constraint 约束名 primary key (字段)
using index;
表结构改变的时候,比如添加列alter table 表名 add 列名 类型,修改列alter table 表名 modify(列名 类型) ,添加约束alter table 表名
add constraint 约束名 primary key (字段)
using index;
本站文章为和通数据库网友分享或者投稿,欢迎任何形式的转载,但请务必注明出处.
同时文章内容如有侵犯了您的权益,请联系QQ:970679559,我们会在尽快处理。