2010年10月26日 星期二

ztb_file 的資料呢?

使用 Oracle 資料庫的 ztb_file 叫不出任何資料,因為產中使用 ALL_TAB_COLUMNS這個來抓資料,建立 p_zta 的單身。

關於這個table 我可以參考 Oracle 提供的資料

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 the ANALYZE 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 OWNER column.
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 NUMBER datatype; binary precision for FLOAT datatype; NULL for all other datatypes
DATA_SCALENUMBER Digits to the right of the decimal point in a number
NULLABLEVARCHAR2(1) Indicates whether a column allows NULLs. The 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 the 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 ANALYZE SQL statement. However, 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, 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
  • NCHAR_CS
CHAR_COL_DECL_LENGTHNUMBER Declaration length of the character type column
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) Indicates that the column uses BYTE length semantics (B) or CHAR length semantics (C), or whether the datatype is not any of the following (NULL):
  • 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


沒有留言:

張貼留言