0racle 查看用户以及对象

转载:http://blog.163.com/lyq_163_2009/blog/static/134082696201071210628720/

 

设置行宽:

set line 300;

 

查询oracle下数据字典表名称及用途:

select * from dictionary;

 

查看表结构:

desc emp;

 

查看用户有多少张表:

select count(*) from dba_tables;

select count(*) from all_tables;

select count(*) from user_tables;

 

查看数据库的对象:

select object_name from user_objects;

 

查看表:

select table_name from user_tables;

 

查看视图:

select view_name from user_views;

 

查看序列:

select sequence_name from user_sequences;

 

查看约束:

select constraint_name from user_constraints;

 

查看具体表的约束:

select constraint_name from user_constraints where table_name='DEPT';

 

查看存储过程:

select procedure_name from user_procedures;

 

查看触发器:

select trigger_name from user_triggers;

 

查看索引:

select index_name from user_indexes;

你可能感兴趣的:(用户)