select * from dba_tab_privs where grantee='user_name'--查看该用户下所有视图信息
select * from dba_dependencies where referenced_name='table_name'--查看该表创建了哪些视图
--查询所有表,owner为用户,dba_objects只能由具有dba角色的用户去查询,比如system用户.
select * from dba_objects where owner='SYS' and object_type='TABLE';
--查询所有视图
select * from dba_objects where object_type='VIEW';
--查看object_type所有对象类型,你可以看看,需要什么就查什么
select distinct object_type from dba_objects order by object_type asc;
查看当前用户的缺省表空间
SQLselect username,default_tablespace from user_users;
查看当前用户的角色
SQLselect * from user_role_privs;
查看当前用户的系统权限和表级权限
SQLselect * from user_sys_privs;
SQLselect * from user_tab_privs;
查看用户下所有的表
SQLselect * from user_tables;
显示用户信息(所属表空间)
select default_tablespace,temporary_tablespace
from dba_users where username='GAME';
①.、用户
显示当前会话所具有的权限
SQLselect * from session_privs;
显示指定用户所具有的系统权限
SQLselect * from dba_sys_privs where grantee='GAME';
显示特权用户
select * from v$pwfile_users;
显示用户的PROFILE
select profile from dba_users where username='GAME';
查看名称包含log字符的表
SQLselect object_name,object_id from user_objects
where instr(object_name,'LOG')0;
查看某表的创建时间
SQLselect object_name,created from user_objects where object_name=upper('table_name');
查看某表的大小
where segment_name=upper('table_name');
查看放在ORACLE的内存区里的表
SQLselect table_name,cache from user_tables where instr(cache,'Y')0;
查看索引个数和类别
SQLselect index_name,index_type,table_name from user_indexes order by table_name;
查看索引被索引的字段
SQLselect * from user_ind_columns where index_name=upper('index_name');
查看索引的大小
where segment_name=upper('index_name');
查看序列号,last_number是当前值
SQLselect * from user_sequences;
查看视图的名称
SQLselect view_name from user_views;
查看创建视图的select语句
SQLset view_name,text_length from user_views;
SQLselect text from user_views where view_name=upper('view_name');
查看同义词的名称
SQLselect * from user_synonyms;
查看某表的约束条件
SQLselect constraint_name, constraint_type,search_condition, r_constraint_name
from user_constraints where table_name = upper('table_name');
SQLselect c.constraint_name,c.constraint_type,cc.column_name
from user_constraints c,user_cons_columns cc
where c.owner = upper('table_owner') and c.table_name = upper('table_name')
and c.owner = cc.owner and c.constraint_name = cc.constraint_name
order by cc.position;
查看函数和过程的状态
SQLselect object_name,status from user_objects where object_type='FUNCTION';
SQLselect object_name,status from user_objects where object_type='PROCEDURE';
查看函数和过程的源代码
SQLselect text from all_source where owner=user and name=upper('plsql_name');
pl/sql
developer
windows
中输入这个物化视图名称有,鼠标右键同样可以查看这个物化视图的创建语句
dbms_metadata.get_ddl
这个函数也可以
视图是没有结构查询语句的.因为试图就是一个别名,如果真的想查,那么可以通过
select * from user_tab_columns where TABLE_NAME='视图名';查询,这里不仅有表的信息,也有视图的怎么查看oracle试图相关咨询.
以上就是土嘎嘎小编为大家整理的怎么查看oracle试图相关主题介绍,如果您觉得小编更新的文章只要能对粉丝们有用,就是我们最大的鼓励和动力,不要忘记讲本站分享给您身边的朋友哦!!