您的位置:首页 > 数据库 > Oracle

查询oracle数据库中所有视图和表的信息

2009-09-15 13:31 253 查看
//查询所有表的信息
select * from dba_tables
//查询所有视图的信息
select * from dba_views
//查询指定表或视图的列信息
select * from dba_tab_columns
注意:当要创建包含Sys表空间的对象时,需要赋 相应表或视图的权限给它。
如 需要创建查询 包含表和视图的 视图
create or replace view v_tableview
as
select owner , table_name from dba_tables
union all
select owner , view_name from dba_views
则需要
grant select on sys.dba_tables to "用户"
grant select on sys.dba_views to "用户"
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: