您的位置:首页 > 技术中心 > 数据库 >

oracle怎样查询注释

时间:2022-02-25 11:56

oracle查询注释的方法:1、利用“select * from user_tab_comments”语句查询表注释;2、利用“select * from user_col_comments”语句查询字段注释。

本教程操作环境:Windows10系统、Oracle 11g版、Dell G3电脑。

oracle怎样查询注释

获取表注释

user_tab_comments;表注释 
select * from user_tab_comments

user_tab_comments:table_name,table_type,comments。

相应的还有dba_tab_comments,all_tab_comments,这两个比user_tab_comments多了ower列。

获取字段注释

select * from user_col_comments 
user_col_comments:table_name,column_name,comments

相应的还有dba_col_comments,all_col_comments,这两个比user_col_comments多了ower列。

user_col_comments;表字段注释(列注释)

user_col_comments视图显示已经为表中的列输入的注释。这些注释通过comment命令添加到数据库中。user_col_comments视图包含3 列:

  • Table_Name 表名或视图名

  • Column_Name 列名

  • Comments 已经为该列输入的注释

推荐教程:《Oracle视频教程》

以上就是oracle怎样查询注释的详细内容,更多请关注gxlsystem.com其它相关文章!

热门排行

今日推荐

热门手游