Home | Previous Page | Next Page   System Catalog Tables > Information Schema (IDS) >

Structure of the Information Schema Views

The following Information Schema views are described in this section:

In order to accept long identifier names, most of the columns in the views are defined as VARCHAR data types with large maximum sizes.

The tables Information Schema View

The tables Information Schema view contains one row for each table to which you have access. It contains the following columns.

Column Data Type Explanation
table_schema VARCHAR(32) Name of owner of table
table_name VARCHAR(128) Name of table or view
table_type VARCHAR(128) BASE TABLE for table or VIEW for view
remarks VARCHAR(255) Reserved for future use

The visible rows in the tables view depend on your privileges. For example, if you have one or more privileges on a table (such as Insert, Delete, Select, References, Alter, Index, or Update on one or more columns), or if privileges are granted to PUBLIC, you see the row that describes that table.

The columns Information Schema View

The columns Information Schema view contains one row for each accessible column. It contains the following columns.

Column Data Type Explanation
table_schema VARCHAR(128) Name of owner of table
table_name VARCHAR(128) Name of table or view
column_name VARCHAR(128) Name of the column in the table or view
ordinal_position INTEGER Position of the column within its table

The ordinal_position value is a sequential number that starts at 1 for the first column. This is an Informix extension to XPG4.

data_type VARCHAR(254) Name of the data type of the column, such as CHARACTER or DECIMAL
char_max_length INTEGER Maximum length (in bytes) for character data types; NULL otherwise
numeric_precision INTEGER Uses one of the following values:
  • Total number of digits for exact numeric data types (DECIMAL, INTEGER, MONEY, SMALLINT)
  • Number of digits of mantissa precision (machine-dependent) for approximate data types (FLOAT, SMALLFLOAT)
  • NULL for all other data types.
numeric_prec_radix INTEGER Uses one of the following values:
  • 2 = Approximate data types (FLOAT and SMALLFLOAT)
  • 10 = Exact numeric data types (DECIMAL, INTEGER, MONEY, and SMALLINT)
  • NULL for all other data types
numeric_scale INTEGER Number of significant digits to the right of the decimal point for DECIMAL and MONEY data types

0 for INTEGER and SMALLINT types
NULL for all other data types

datetime_precision INTEGER Number of digits in the fractional part of the seconds for DATE and DATETIME columns; NULL otherwise

This column is an Informix extension to XPG4.

is_nullable VARCHAR(3) Indicates whether a column allows NULL values; either YES or NO
remarks VARCHAR(254) Reserved for future use

The sql_languages Information Schema View

The sql_languages Information Schema view contains a row for each instance of conformance to standards that the current database server supports. The sql_languages view contains the following columns.

Column Data Type Explanation
source VARCHAR(254) Organization defining this SQL version
source_year VARCHAR(254) Year the source document was approved
conformance VARCHAR(254) Standard to which the server conforms
integrity VARCHAR(254) Indication of whether this is an integrity enhancement feature; either YES or NO
implementation VARCHAR(254) Identification of the SQL product of the vendor
binding_style VARCHAR(254) Direct, module, or other binding style
programming_lang VARCHAR(254) Host language for which binding style is adapted

The sql_languages view is completely visible to all users.

The server_info Information Schema View

The server_info Information Schema view describes the database server to which the application is currently connected. It contains two columns.

Column Data Type Explanation
server_attribute VARCHAR(254) An attribute of the database server
attribute_value VARCHAR(254) Value of the server_attribute as it applies to the current database server

Each row in this view provides information about one attribute. X/Open-compliant databases must provide applications with certain required information about the database server.

The server_info view includes the following server_attribute information.

server_attribute Explanation
identifier_length Maximum number of bytes for a user-defined identifier
row_length Maximum number of bytes in a row
userid_length Maximum number of bytes in a user name
txn_isolation Initial transaction isolation level for the database server:

Read Uncommitted( = Default isolation level for databases with no transaction logging; also called Dirty Read)

Read Committed( = Default isolation level for databases that are not ANSI-compliant but that support explicit transaction logging)

Serializable( = Default isolation level for ANSI-compliant databases; also called Repeatable Read)

collation_seq Assumed ordering of the character set for the database server
The following values are possible:
ISO 8859-1EBCDIC

The default Informix representation shows ISO 8859-1.

The server_info view is completely visible to all users.

Home | [ Top of Page | Previous Page | Next Page | Contents | Index ]