欢迎投稿

今日深度:

ORACLE中给表、列增加注释以及读取注释,oracle注

ORACLE中给表、列增加注释以及读取注释,oracle注释


在ORACLE中给表、列增加注释以及读取注释
1、给表填加注释:SQL>comment on table 表名 is '表注释";

2、给列加注释:SQL>comment on column 表.列 is '列注释';

3、读取表注释:SQL>select * from user_tab_comments where comments is not null;

4、读取列注释:SQL>select * from user_col_commnents where comments is not null and table_name='表名';

附表USER_TAB_COMMENTS和user_col_comments的结构:

1、user_tab_comments由table_name、table_type和comments三部分组成。

2、user_col_comments由table_name、column_name和comments三部分组成。

3、在SQL*PLUS中显示表结构:desc 表名;


oracle数据库中,怎用sql语句给某个字段添加注释哇?麻烦知道的人透露下,啦

COMMENT ON COLUMN 表名.列名 IS '注释内容';
 

oracle数据库 表的注释怎在程序中取得?

1.select * from user_col_comments where table_name='表名'

2.select * from USER_TAB_COMMENTS where table_name='表名'

第一个是查字段注释,第二个是查表的注释,表名需要大写
 

www.htsjk.Com true http://www.htsjk.com/shujukunews/3515.html NewsArticle ORACLE中给表、列增加注释以及读取注释,oracle注释 在ORACLE中给表、列增加注释以及读取注释 1、给表填加注释:SQLcomment on table 表名 is '表注释; 2、给列加注释:SQLcomment on column 表.列...
评论暂时关闭