Oracle 视图 ALL_TAB_COLUMNS 官方解释,作用,如何使用详细说明
本站中文解释
Oracle视图all_tab_columns是一个系统视图,用于存储拥有者所具有访问权限的对象的表和列的编目信息,也就是系统中所有表和列的信息。
此视图可以用来检索特定表或者特定列的一些元数据信息,例如列名、类型、大小等等,我们也可以通过这个视图获取到某一数据库中的表的细节信息。
要使用all_tab_columns视图,请使用SELECT语句,可以指定要检索哪些列,以及查询条件(其中必须包含表名和列名),例如:
SELECT column_name, data_type, data_length
FROM all_tab_columns
WHERE table_name = ‘MyTable’ AND column_name IN (‘C1’, ‘C2’);
此查询在视图中搜索名为MyTable的表中的C1和C2两个列,并获取它们的名称、数据类型和数据长度的信息。
官方英文解释
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 DBMS_STATS
package.
This view filters out system-generated hidden columns. The ALL_TAB_COLS
view does not filter out system-generated hidden columns.
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 theOWNER
column.
Column | Datatype | NULL | Description |
---|---|---|---|
|
|
| Owner of the table, view, or cluster |
|
|
| Name of the table, view, or cluster |
|
|
| Column name |
|
| Data type of the column | |
|
| Data type modifier of the column | |
|
| Owner of the data type of the column | |
|
|
| Length of the column (in bytes) |
|
| Decimal precision for | |
|
| Digits to the right of the decimal point in a number | |
|
| Indicates whether a column allows NULLs. The value is | |
|
| Sequence number of the column as created | |
|
| Length of the default value for the column | |
|
| Default value for the column | |
|
| Number of distinct values in the column. This column remains for backward compatibility with Oracle7. This information is now in the | |
|
| Low value in the column. This column remains for backward compatibility with Oracle7. This information is now in the | |
|
| High value in the column. This column remains for backward compatibility with Oracle7. This information is now in the | |
|
| If a histogram is available on If a histogram is not available on This column remains for backward compatibility with Oracle7. This information is now in the | |
|
| Number of NULLs in the column | |
|
| Number of buckets in the histogram for the column Note: The number of buckets in a histogram is specified in the | |
|
| Date on which this column was most recently analyzed | |
|
| Sample size used in analyzing this column | |
|
| Name of the character set:
| |
|
| Declaration length of the character type column | |
|
|
| |
|
| Indicates whether statistics were entered directly by the user ( | |
|
| Average length of the column (in bytes) | |
|
| Displays the length of the column in characters. This value only applies to the following datatypes:
| |
|
| Indicates that the column uses
| |
|
| Indicates whether the column data is in release 8.0 image format ( | |
|
| Indicates whether the column data has been upgraded to the latest type version format ( | |
|
| Indicates existence/type of histogram:
| |
|
| Indicates whether the column has | |
|
| Indicates whether this is an identity column ( | |
|
| Name of the edition in which editioned objects referenced in an expression column are resolved | |
|
| Name of the oldest edition in which the column is usable | |
|
| Name of the oldest edition in which the column becomes perpetually unusable | |
|
| Collation for the column. Only applies to columns with character data types. |
See Also:
“DBA_TAB_COLUMNS”
“USER_TAB_COLUMNS”
“ALL_TAB_COLS”
Oracle Database PL/SQL
Packages and Types Reference for more information about theDBMS_STATS
package
标签:视图,信息,是一个,编目,数据