网站首页 > 文章中心 > 其它

怎么查看oracle试图

作者:小编 更新时间:2023-08-30 00:45:51 浏览量:116人看过

Oracle查看用户下,表下有哪些视图

select * from dba_tab_privs where grantee='user_name'--查看该用户下所有视图信息

select * from dba_dependencies where referenced_name='table_name'--查看该表创建了哪些视图

怎么查看oracle试图-图1

如何查询oracle中的所有表和视图

--查询所有表,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;

查看Oracle有哪些表或者视图

怎么查看oracle试图-图2

oracle 如何查找视图名称

查看当前用户的缺省表空间

SQLselect username,default_tablespace from user_users;

查看当前用户的角色

SQLselect * from user_role_privs;

查看当前用户的系统权限和表级权限

SQLselect * from user_sys_privs;

怎么查看oracle试图-图3

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');

oracle 怎么查看已有的物化视图

pl/sql

developer

windows

中输入这个物化视图名称有,鼠标右键同样可以查看这个物化视图的创建语句

dbms_metadata.get_ddl

这个函数也可以

oracle数据库怎样查看视图结构

视图是没有结构查询语句的.因为试图就是一个别名,如果真的想查,那么可以通过

select * from user_tab_columns where TABLE_NAME='视图名';查询,这里不仅有表的信息,也有视图的怎么查看oracle试图相关咨询.

以上就是土嘎嘎小编为大家整理的怎么查看oracle试图相关主题介绍,如果您觉得小编更新的文章只要能对粉丝们有用,就是我们最大的鼓励和动力,不要忘记讲本站分享给您身边的朋友哦!!

版权声明:倡导尊重与保护知识产权。未经许可,任何人不得复制、转载、或以其他方式使用本站《原创》内容,违者将追究其法律责任。本站文章内容,部分图片来源于网络,如有侵权,请联系我们修改或者删除处理。

编辑推荐

热门文章