`

oracle增删改重命名列

 
阅读更多

1.增加列

alter table my_user add testcol varchar2(100);

 

2.修改列

alter table my_user modify testcol varchar2(200);

 

3.修改列名

alter table my_user rename column testcol to tcol;

 

4.删除列

ater table my_user drop column testcol;

 

5.修改表名

rename my_user to you_user;

 

6.增加注释

comment on table my_user  is '用户表';

comment on column my_user.username is '用户名'

 

7.查看所有注释

select *from user_tab_comment where table_name=MY_USER;

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics