Oracle数据库中 comment (注释) 修改方法:分两种情况,一种是表注释,一种是字段注释.对表或表字段增加或修改注释内容的方法都是一样的. 一、表注释修改语法:comment on table 表名 is '注释内容'; 二、字段注释修改语法:
修改oracle表中的字段使用"rename "关键字.方法如下 修改字段名的方法:alter table 表名 rename column 原字段名 to 新字段名 修改表名的方法:alter table 表名 rename to 新表名
获取字段注释:select * from user_col_comments user_col_comments:table_name,column_name,comments相应的还有dba_col_comments,all_col_comments,这两个比user_col_comments多了ower列.
用PLSQL/Developer打开表,编辑:
使用命令desc 表名即可.desc:describe,即给出表的定义.
现在正在做动态建表,使用java来为数据库建表,表可以创建成功,但为表字段添加注释用statement的executequery()执行添加注释的语句老报无效字符的异常.添加注释的语句 是 comment on table "ta_flight_v2" is '系统的航班基本信息表'.
oracle中查询某个表字段的注释方法:SQL>select * from user_col_commnents where comments is not null and table_name='表名';
1.select constraint_name,table_name from dba_cons_columns where table_name='xxx';找出这个约束的名称2.alter table xxx drop constraint yyy(第一步查出来的名字)3.alter tablexxx modify iSubscribeState varchar2(20);
oracle中查询某个表字段的注释方法:SQL>select * from user_col_commnents where comments is not null and table_name='表名';
备注有什么类型?如果你的字段名称就叫血液的话alter table 部门表 modify 备注 varchar2(400);