`
itace
  • 浏览: 178442 次
  • 性别: Icon_minigender_1
  • 来自: 北京
文章分类
社区版块
存档分类
最新评论

oracle所有表的基本信息

 
阅读更多

原文: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.

Column Datatype NULL Description
OWNER VARCHAR2(30) NOT NULL Owner of the table, view, or cluster
TABLE_NAME VARCHAR2(30) NOT NULL Name of the table, view, or cluster
COLUMN_NAME VARCHAR2(30) NOT NULL Column name
DATA_TYPE VARCHAR2(106)   Datatype of the column
DATA_TYPE_MOD VARCHAR2(3)   Datatype modifier of the column
DATA_TYPE_OWNER VARCHAR2(30)   Owner of the datatype of the column
DATA_LENGTH NUMBER NOT NULL Length of the column (in bytes)
DATA_PRECISION NUMBER   Decimal precision for NUMBERdatatype; binary precision forFLOAT datatype, null for all other datatypes
DATA_SCALE NUMBER   Digits to right of decimal point in a number
NULLABLE VARCHAR2(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_ID NUMBER   Sequence number of the column as created
DEFAULT_LENGTH NUMBER   Length of default value for the column
DATA_DEFAULT LONG   Default value for the column
NUM_DISTINCT NUMBER   Number of distinct values in the columnFoot 1 
LOW_VALUE RAW(32)   Low value in the columnFootref 1
HIGH_VALUE RAW(32)   High value in the columnFootref 1
DENSITY NUMBER   Density of the columnFootref 1
NUM_NULLS NUMBER   Number of nulls in the column
NUM_BUCKETS NUMBER   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_ANALYZED DATE   Date on which this column was most recently analyzed
SAMPLE_SIZE NUMBER   Sample size used in analyzing this column
CHARACTER_SET_NAME VARCHAR2(44)   Name of the character set:CHAR_CS or NCHAR_CS
CHAR_COL_DECL_LENGTH NUMBER   Length
GLOBAL_STATS VARCHAR2(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_STATS VARCHAR2(3)   Indicates whether statistics were entered directly by the user (YES) or not (NO)
AVG_COL_LEN NUMBER   Average length of the column (in bytes)
CHAR_LENGTH NUMBER   Displays the length of the column in characters. This value only applies to the following datatypes:
  • CHAR

  • VARCHAR2

  • NCHAR

  • NVARCHAR

CHAR_USED VARCHAR2(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_IMAGE VARCHAR2(3)   Indicates whether the column data is in release 8.0 image format (YES) or not (NO)
DATA_UPGRADED VARCHAR2(3)   Indicates whether the column data has been upgraded to the latest type version format (YES) or not (NO)
HISTOGRAM VARCHAR2(15)   Indicates existence/type of histogram:
  • NONE

  • FREQUENCY

  • HEIGHT BALANCED

分享到:
评论

相关推荐

    ORACLE表的基本操作

    在Oracle数据库中,表是数据存储的基本单位,它包含了各种字段(或称为列),用于组织和管理信息。本文将深入探讨Oracle表的基本操作,包括创建、查询、更新和删除等核心概念,以及与NULL值相关的处理。 首先,创建...

    如何在oracle中查询所有用户表的表名、主键名称、索引、外键等

    `user_tab_columns` 表存储了表中各列的基本信息,而 `user_col_comments` 表则包含了列的注释信息。通过将这两张表按 `table_name` 和 `column_name` 连接起来,可以获取到完整的列信息及其注释。 以上就是关于...

    oracle系统表查询

    `**:显示所有表空间的基本信息,包括表空间名称、状态、大小等。 - **查询空闲表空间**:`SELECT tablespace_name, SUM(bytes) AS free_space, SUM(blocks) AS free_blocks FROM dba_free_space GROUP BY ...

    Oracle 数据库基本信息查询sql语句

    Oracle 数据库基本信息查询sql语句

    ORACLE 多表查询与数据修改

    ### ORACLE 多表查询与数据修改 ...通过本次实验的学习,您可以更加熟练地掌握Oracle数据库中的多表查询技巧,以及基本的INSERT、UPDATE和DELETE操作。这对于日常的数据库管理和开发工作都是非常有用的技能。

    Oracle系统表汇总.docx

    通过dba_tables视图,可以查询表的基本信息,包括表名称、表类型、创建日期等信息。 索引管理 索引是Oracle数据库中的一种辅助数据结构,用于加速数据查询。索引管理是Oracle数据库管理系统的重要组件,用于管理...

    oracle增加表空间

    ### Oracle在Linux环境下增加表空间及用户操作指南 #### 一、概述 Oracle数据库是业界广泛使用的数据库管理系统之一,为了确保数据库性能与可用性,合理地管理表空间是非常重要的一个环节。本文将详细介绍如何在...

    抽取oracle 所有表

    在Oracle中,获取所有表的元数据信息可以通过执行SQL查询来完成,例如使用以下SQL语句: ```sql SELECT table_name FROM all_tables WHERE owner = 'YOUR_SCHEMA_NAME'; ``` 这里,`YOUR_SCHEMA_NAME`需要替换为...

    oracle外部表的使用

    同时,Oracle提供了`DBA_EXTERNAL_TABLES`视图和`DBA_EXTERNAL_LOCATIONS`视图,用于查看外部表的相关信息,如所有者、表名、默认目录以及访问参数等,这对于管理和维护外部表非常有帮助。 ### 四、注意事项 在...

    ORACLE主要的系统表和系统视图

    - **DBA_TABLES/ALL_TABLES/USER_TABLES**:提供关于数据库表的基本信息,如表名称、表空间、创建时间等。 - **DBA_TAB_COLUMNS/ALL_TAB_COLUMNS/USER_TAB_COLUMNS**:提供每个表的具体列信息,如列名、数据类型、...

    如何查询Oracle表空间和数据文件信息

    这个查询组合了`dba_free_space`(表空间的空闲空间)、`dba_data_files`(数据文件信息)和`dba_tablespaces`(所有表空间信息)这三个数据字典表,提供了关于表空间的详细信息。 二、查询Oracle数据库中数据文件...

    c# 导出oracle数据库下所有表结构

    Oracle的系统视图"All_tables"包含了数据库中的所有表信息。以下是如何查询表名: ```csharp OracleCommand command = new OracleCommand("SELECT TABLE_NAME FROM ALL_TABLES", connection); OracleDataReader ...

    oracle查用户所有表

    在Oracle数据库管理系统中,查询用户所有表的相关信息是一项常见的操作,这对于数据库管理和开发工作至关重要。本文将详细解释如何使用SQL语句来实现这一目标,并提供一些相关的查询技巧。 首先,我们来看两个主要...

    oracle4的表查询和基本函数.docx

    本文将深入探讨Oracle4中的表查询和基本函数。 首先,我们关注的是基本查询。在Oracle中,查询多表通常涉及到联接操作。以示例中的雇员表(EMP)和部门表(DEPT)为例,我们可以使用JOIN语句来获取雇员及其所在部门...

    Oracle本地管理表空间

    在字典管理表空间中,Oracle通过数据字典中的特定表来记录表空间内所有区的使用状态。当一个区被分配或释放时,相应的数据字典表会被更新。这种方式存在以下缺点: - 更新数据字典表会产生额外的回滚信息,增加了...

    Oracle使用dblink导用户下的所有表数据(以迁移scott用户为例)

    在本教程中,我们将探讨如何利用DB Link来迁移Oracle数据库中的用户下所有表的数据,以scott用户为例进行操作。 首先,我们需要理解DB Link的基本概念。DB Link是Oracle提供的一种机制,它允许在一个数据库(本地...

    ORACLE_多表关联_UPDATE_语句

    `customers`表存储客户的基本信息,包括客户标识、所在城市和客户类型,而`tmp_cust_city`表则包含了更准确的客户城市信息,可能还包括了客户的VIP状态。 1) 最简单的多表关联UPDATE语句: 在这种情况下,我们已经...

    oracle数据表导出为word文档

    首先,理解Oracle数据表的基本概念。在Oracle数据库中,数据表是存储数据的主要结构,由一系列行和列组成,每一行代表一个实体,每一列代表实体的一个属性。要将这些数据表导出,我们需要一个中间工具来完成转换。 ...

    Oracle用户(user)和表空间(tablespace).pdf

    通过本文的详细讲解和实例演示,初学者能够逐步建立起对 Oracle 用户和表空间的全面认识,并具备基本的管理和操作能力。在实践中不断探索和学习,将有助于进一步提升在 Oracle 数据库管理领域的专业技能。

Global site tag (gtag.js) - Google Analytics