欢迎投稿

今日深度:

alter,alter官网

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;


Oracle Alter table用于什情况

表结构改变的时候,比如添加列alter table 表名 add 列名 类型,修改列alter table 表名 modify(列名 类型) ,添加约束alter table 表名
add constraint 约束名 primary key (字段)
using index;
 

Oracle Alter table用于什情况

表结构改变的时候,比如添加列alter table 表名 add 列名 类型,修改列alter table 表名 modify(列名 类型) ,添加约束alter table 表名
add constraint 约束名 primary key (字段)
using index;
 

www.htsjk.Com true http://www.htsjk.com/shujukunews/3862.html NewsArticle alter,alter官网 更改表字段类型 alter table 表名 modify 字段 改后的字段类型 更改表名 alter table 表名 rename to 表名2 添加表字段 alter table 表名 add 字段 类型 (字段1 类型1,字段2 类型2) 删...
评论暂时关闭