USER_OBJECTS

USER_OBJECTS
当前用户所拥有的所有对象。可以通过如下sql语句查看:
SELECT * FROM USER_OBJECTS;

各字段意义如下:

OWNER
对象的所有者,查询USER_OBJECTS视图,该字段不会显示。

OBJECT_NAME
对象名称。

SUBOBJECT_NAME
Name of the subobject (for example, partition)

OBJECT_ID
NUMBER NOT NULL Dictionary object number of the object

DATA_OBJECT_ID
Dictionary object number of the segment that contains the object

Note: OBJECT_ID and DATA_OBJECT_ID display data dictionary metadata. Do not confuse these numbers with the unique 16-byte object identifier (object ID) that the Oracle Database assigns to row objects in object tables in the system.

OBJECT_TYPE
Type of the object (such as TABLE, INDEX)

CREATED DATE
Timestamp for the creation of the object

LAST_DDL_TIME
Timestamp for the last modification of the object resulting from a DDL statement (including grants and revokes)

TIMESTAMP
Timestamp for the specification of the object (character data)

STATUS
Status of the object (VALID, INVALID, or N/A)

TEMPORARY
Whether the object is temporary (the current session can see only data that it placed in this object itself)

GENERATED
Was the name of this object system generated? (Y|N)

SECONDARY
Whether this is a secondary object created by the ODCIIndexCreate method of the Oracle Data Cartridge (Y | N)

查看当前用户的所有表:
select object_name
from user_objects
where
upper(object_type) = ‘TABLE’ ;

查看指定表的所有约束:
select constraint_name , constraint_type
from user_constraints
where lower(table_name)=’table_name’;

参考链接:
http://www.stanford.edu/dept/itss/docs/oracle/10g/server.101/b10755/statviews_1102.htm#i1583352
http://www.tek-tips.com/viewthread.cfm?qid=482760

此条目发表在mysql/oracle/postgresql分类目录,贴了标签。将固定链接加入收藏夹。

发表评论

您的电子邮箱地址不会被公开。

此站点使用Akismet来减少垃圾评论。了解我们如何处理您的评论数据