select * from user_tables;
select * from dictionary;
-- 数据字典的命名规则:
前缀 说明
user 用户自定义
DBA 管理员视图
ALL 用户可访问
V$ 动态性能视图
-- 查询当前用户创建的表
select * from user_tables;
-- 数据库对象
user_objects 和 all_objects
select * from user_objects;
select * from all_objects;--应该是2
-- 表
user_tables 和 all_tables;
select * from user_tables;
select * from all_tables;--应该是6
select * from DUAL;
-- 约束:user_constrains
select * from user_constraints;
-- 视图:user_views 和 all_views
select * from user_views;
select * from all_views;--7
-- 序列:user_sequences
select * from user_sequences;
-- 给表添加注释
-- 使用comment语句给表或列添加注释
-- 表的注释: comment on table 表名 is'注释内容';
comment on table emp is'This is the employees information';
-- 相关视图
All_Col_Comments
User_Col_Comments
All_Tab_Comments
User_Tab_Comments
select * from user_tab_comments where table_name = 'DEPT'; -- table_name中的内容要大写
Oracle数据库 数据字典
最新推荐文章于 2024-07-29 12:32:44 发布
这篇博客介绍了Oracle数据库中如何查询用户对象,包括用户表、对象、约束、视图和序列。还讲解了如何使用`COMMENT ON`语句为表添加注释,并展示了查询表注释的方法。涉及的关键技术包括数据字典、动态性能视图以及对象管理。
摘要由CSDN通过智能技术生成