oracle所有表的基本信息

15 篇文章 0 订阅
9 篇文章 0 订阅

原文:http://docs.oracle.com/cd/B19306_01/server.102/b14237/statviews_2094.htm

ALL_TAB_COLUMNS

ALL_TAB_COLUMNS describes the columns of the tables, views, and clusters accessible to the current user. To gather statistics for this view, use theANALYZE SQL statement or the DBMS_STATS package.

Related Views

  • DBA_TAB_COLUMNS describes the columns of all tables, views, and clusters in the database.

  • USER_TAB_COLUMNS describes the columns of the tables, views, and clusters owned by the current user. This view does not display the OWNERcolumn.

ColumnDatatypeNULLDescription
OWNERVARCHAR2(30)NOT NULLOwner of the table, view, or cluster
TABLE_NAMEVARCHAR2(30)NOT NULLName of the table, view, or cluster
COLUMN_NAMEVARCHAR2(30)NOT NULLColumn name
DATA_TYPEVARCHAR2(106) Datatype of the column
DATA_TYPE_MODVARCHAR2(3) Datatype modifier of the column
DATA_TYPE_OWNERVARCHAR2(30) Owner of the datatype of the column
DATA_LENGTHNUMBERNOT NULLLength of the column (in bytes)
DATA_PRECISIONNUMBER Decimal precision for NUMBERdatatype; binary precision forFLOAT datatype, null for all other datatypes
DATA_SCALENUMBER Digits to right of decimal point in a number
NULLABLEVARCHAR2(1) Specifies whether a column allows NULLs. Value is N if there is a NOT NULL constraint on the column or if the column is part of a PRIMARY KEY. The constraint should be in an ENABLE VALIDATE state.
COLUMN_IDNUMBER Sequence number of the column as created
DEFAULT_LENGTHNUMBER Length of default value for the column
DATA_DEFAULTLONG Default value for the column
NUM_DISTINCTNUMBER Number of distinct values in the columnFoot 1 
LOW_VALUERAW(32) Low value in the columnFootref 1
HIGH_VALUERAW(32) High value in the columnFootref 1
DENSITYNUMBER Density of the columnFootref 1
NUM_NULLSNUMBER Number of nulls in the column
NUM_BUCKETSNUMBER Number of buckets in the histogram for the column

Note: The number of buckets in a histogram is specified in the SIZEparameter of the SQL statementANALYZE. However, the Oracle Database does not create a histogram with more buckets than the number of rows in the sample. Also, if the sample contains any values that are very repetitious, the Oracle Database creates the specified number of buckets, but the value indicated by this column may be smaller because of an internal compression algorithm.

LAST_ANALYZEDDATE Date on which this column was most recently analyzed
SAMPLE_SIZENUMBER Sample size used in analyzing this column
CHARACTER_SET_NAMEVARCHAR2(44) Name of the character set:CHAR_CS or NCHAR_CS
CHAR_COL_DECL_LENGTHNUMBER Length
GLOBAL_STATSVARCHAR2(3) For partitioned tables, indicates whether column statistics were collected for the table as a whole (YES) or were estimated from statistics on underlying partitions and subpartitions (NO)
USER_STATSVARCHAR2(3) Indicates whether statistics were entered directly by the user (YES) or not (NO)
AVG_COL_LENNUMBER Average length of the column (in bytes)
CHAR_LENGTHNUMBER Displays the length of the column in characters. This value only applies to the following datatypes:
  • CHAR

  • VARCHAR2

  • NCHAR

  • NVARCHAR

CHAR_USEDVARCHAR2(1)  B | CB indicates that the column uses BYTE length semantics. Cindicates that the column usesCHAR length semantics. NULLindicates the datatype is not any of the following:
  • CHAR

  • VARCHAR2

  • NCHAR

  • NVARCHAR2

V80_FMT_IMAGEVARCHAR2(3) Indicates whether the column data is in release 8.0 image format (YES) or not (NO)
DATA_UPGRADEDVARCHAR2(3) Indicates whether the column data has been upgraded to the latest type version format (YES) or not (NO)
HISTOGRAMVARCHAR2(15) Indicates existence/type of histogram:
  • NONE

  • FREQUENCY

  • HEIGHT BALANCED

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值