There are two versions of some of the ANS and ISO catalog views. The version documented is the normal set of ANS and ISO views. A second set of views have names that are limited to no more than 18 characters and other than the view names are not documented in this book.
The ANS and ISO catalog includes the following tables in the QSYS2 library:
View Name | Shorter View Name | Description |
---|---|---|
SQL_FEATURES | Information about features supported by the database manager | |
SQL_LANGUAGES | SQL_LANGUAGES_S | Information about the supported languages |
SQL_SIZING | Information about the limits supported by the database manager |
The ANS and ISO catalog includes the following views and tables in the SYSIBM and QSYS2 libraries:
View Name | Shorter View Name | Description |
---|---|---|
CHARACTER_SETS | CHARACTER_SETS_S | Information about supported CCSIDs |
CHECK_CONSTRAINTS | Information about check constraints | |
COLUMNS | COLUMNS_S | Information about columns |
INFORMATION_SCHEMA_CATALOG_NAME | CATALOG_NAME | Information about the relational database |
PARAMETERS | PARAMETERS_S | Information about procedure parameters |
REFERENTIAL_CONSTRAINTS | REF_CONSTRAINTS | Information about referential constraints |
ROUTINES | ROUTINES_S | Information about routines |
SCHEMATA | SCHEMATA_S | Statistical information about schemas |
TABLE_CONSTRAINTS | Information about constraints | |
TABLES | TABLES_S | Information about tables |
USER_DEFINED_TYPES | UDT_S | Information about distinct types |
VIEWS | Information about views |
The CHARACTER_SETS view contains one row for every CCSID supported. The following table describes the columns in the view:
Column Name | Data Type | Description |
---|---|---|
CHARACTER_SET_CATALOG | VARCHAR(128) | Relational database name |
CHARACTER_SET_SCHEMA | VARCHAR(128) | The schema name of the character set. Contains 'SYSIBM'. |
CHARACTER_SET_NAME | VARCHAR(128) | The character set name. |
FORM_OF_USE | VARCHAR(128)
Nullable |
Reserved. Contains the null value. |
NUMBER_OF_CHARACTERS | INTEGER
Nullable |
Reserved. Contains the null value. |
DEFAULT_COLLATE_CATALOG | VARCHAR(128) | Reserved. Contains the relational database name. |
DEFAULT_COLLATE_SCHEMA | VARCHAR(128) | Reserved. Contains SYSIBM. |
DEFAULT_COLLATE_NAME | VARCHAR(128) | Reserved. Contains IBMDEFAULT. |
The CHECK_CONSTRAINTS view contains one row for every check constraint. The following table describes the columns in the view:
Column Name | Data Type | Description |
---|---|---|
CONSTRAINT_CATALOG | VARCHAR(128) | Relational database name |
CONSTRAINT_SCHEMA | VARCHAR(128) | Name of the schema containing the constraint |
CONSTRAINT_NAME | VARCHAR(128) | Name of the constraint |
CHECK_CLAUSE | VARCHAR(2000)
Nullable |
Text of the check constraint clause
Contains the null value if the check clause cannot be contained in the column without truncation. |
The COLUMNS view contains one row for every column. The following table describes the columns in the view:
The INFORMATION_SCHEMA_CATALOG_NAME view contains one row for the relational database. The following table describes the columns in the view:
Column Name | Data Type | Description |
---|---|---|
CATALOG_NAME | VARCHAR(128) | Relational database name |
The PARAMETERS view contains one row for each parameter of a routine in the relational database. The following table describes the columns in the view:
The REFERENTIAL_CONSTRAINTS view contains one row for each referential constraint. The following table describes the columns in the view:
Column Name | Data Type | Description |
---|---|---|
CONSTRAINT_CATALOG | VARCHAR(128) | Relational database name |
CONSTRAINT_SCHEMA | VARCHAR(128) | Name of the schema containing the constraint. |
CONSTRAINT_NAME | VARCHAR(128) | Name of the constraint. |
UNIQUE_CONSTRAINT_CATALOG | VARCHAR(128) | Relational database name containing the unique constraint referenced by the referential constraint. |
UNIQUE_CONSTRAINT_SCHEMA | VARCHAR(128) | Name of the SQL schema containing the unique constraint referenced by the referential constraint. |
UNIQUE_CONSTRAINT_NAME | VARCHAR(128) | Name of the unique constraint referenced by the referential constraint. |
MATCH_OPTION | VARCHAR(7) | Reserved. Contains 'NONE'. |
UPDATE_RULE | VARCHAR(11) | Update Rule.
|
DELETE_RULE | VARCHAR(11) | Delete Rule
|
COLUMN_COUNT | INTEGER | Count of columns in the constraint. |
The ROUTINES view contains one row for each routine. The following table describes the columns in the view:
The SCHEMATA view contains one row for each schema. The following table describes the columns in the view:
Column Name | Data Type | Description |
---|---|---|
CATALOG_NAME | VARCHAR(128) | Relational database name |
SCHEMA_NAME | VARCHAR(128) | Name of the schema |
SCHEMA_OWNER | VARCHAR(128) | Owner of the schema |
DEFAULT_CHARACTER_SET_CATALOG | VARCHAR(128) | Relational database name |
DEFAULT_CHARACTER_SET_SCHEMA | VARCHAR(128) | The schema name of the default character set. Contains 'SYSIBM'. |
DEFAULT_CHARACTER_SET_NAME | VARCHAR(128) | The default character set name. |
SQL_PATH | VARCHAR(4096)
Nullable |
Reserved. Contains the null value. |
The SQL_FEATURES table contains one row for each feature supported by the database manager. The following table describes the columns in the table:
Column Name | Data Type | Description |
---|---|---|
FEATURE_ID | VARCHAR(7)
Nullable |
ANS and ISO feature ID |
FEATURE_NAME | VARCHAR(128) | The name of the ANS and ISO feature. |
SUB_FEATURE_ID | VARCHAR(7)
Nullable |
ANS and ISO subfeature ID |
SUB_FEATURE_NAME | VARCHAR(256) | The name of the ANS and ISO subfeature. |
IS_SUPPORTED | VARCHAR(3) | Indicates whether the feature is supported:
|
IS_VERIFIED_BY | VARCHAR(128)
Nullable |
Reserved. Contains the null value. |
COMMENTS | VARCHAR(2000)
Nullable |
Reserved. Contains the null value. |
The SQL_LANGUAGES table contains one row for every SQL language binding and programming language for which conformance is claimed. The following table describes the columns in the SQL_LANGUAGES table:
Column Name | Data Type | Description |
---|---|---|
SQL_LANGUAGE_SOURCE | VARCHAR(254) | Name of the standard. |
SQL_LANGUAGE_YEAR |
VARCHAR(254) |
Year in which the standard was approved. |
SQL_LANGUAGE_CONFORMANCE |
VARCHAR(254)
Nullable |
Level of conformance.
Contains the null value if conformance is not yet claimed. |
SQL_LANGUAGE_INTEGRITY |
VARCHAR(254)
Nullable |
Support of the integrity feature.
Contains the null value if the standard does not have a separate integrity feature. |
SQL_LANGUAGE_IMPLEMENTATION |
VARCHAR(254)
Nullable |
Reserved. Contains the null value. |
SQL_LANGUAGE_BINDING_STYLE |
VARCHAR(254) |
The style of binding of the SQL language
|
SQL_LANGUAGE_PROGRAMMING_LANG |
VARCHAR(254)
Nullable |
The language supported by EMBEDDED or CLI.
Contains the null value if the SQL_LANGUAGE_BINDING_STYLE is DIRECT. |
The SQL_SIZING table contains one row for each limit supported by the database manager. The following table describes the columns in the table:
Column Name | Data Type | Description |
---|---|---|
SIZING_ID | INTEGER | ANS and ISO sizing ID |
SIZING_NAME | VARCHAR(128) | Name of the ANS and ISO sizing. |
SUPPORTED_VALUE | BIGINT
Nullable |
Indicates the sizing limit.
Contains the null value if the sizing limit is not applicable. |
COMMENTS | VARCHAR(2000)
Nullable |
Reserved. Contains the null value. |
The TABLE_CONSTRAINTS view contains one row for each constraint. The following table describes the columns in the view:
Column Name | Data Type | Description |
---|---|---|
CONSTRAINT_CATALOG | VARCHAR(128) | Relational database name |
CONSTRAINT_SCHEMA | VARCHAR(128) | Name of the schema containing the constraint. |
CONSTRAINT_NAME | VARCHAR(128) | Name of the constraint. |
TABLE_CATALOG | VARCHAR(128) | Relational database name |
TABLE_SCHEMA | VARCHAR(128) | Name of the schema containing the table. |
TABLE_NAME | VARCHAR(128) | Name of the table which the constraint is created over. |
CONSTRAINT_TYPE | VARCHAR(11) | Constraint Type
|
IS_DEFERRABLE | VARCHAR(3) | Indicates whether the constraint checking can be deferred. Contains 'NO'. |
INITIALLY_DEFERRED | VARCHAR(3) | Indicates whether the constraint was defined as initially deferred. Contains 'NO'. |
The TABLES view contains one row for each table, view, and alias. The following table describes the columns in the view:
Column Name | Data Type | Description |
---|---|---|
TABLE_CATALOG | VARCHAR(128) | Relational database name |
TABLE_SCHEMA | VARCHAR(128) | Name of the SQL schema that contains the table, view or alias. |
TABLE_NAME | VARCHAR(128) | Name of the table, view or alias. |
TABLE_TYPE | VARCHAR(24) | Indicates the type of the table:
|
SELF_REFERENCING_COLUMN_NAME | VARCHAR(128)
Nullable |
Reserved. Contains the null value. |
REFERENCE_GENERATION | VARCHAR(128)
Nullable |
Reserved. Contains the null value. |
USER_DEFINED_TYPE_CATALOG | VARCHAR(128)
Nullable |
Reserved. Contains the null value. |
USER_DEFINED_TYPE_SCHEMA | VARCHAR(128)
Nullable |
Reserved. Contains the null value. |
USER_DEFINED_TYPE_NAME | VARCHAR(128)
Nullable |
Reserved. Contains the null value. |
IS_INSERTABLE_INTO | VARCHAR(3) | Identifies whether an INSERT is allowed on
the table.
|
The USER_DEFINED_TYPES view contains one row for each distinct type.111 The following table describes the columns in the view:
The VIEWS view contains one row for each view. The following table describes the columns in the view:
Column Name | Data Type | Description |
---|---|---|
TABLE_CATALOG | VARCHAR(128) | Relational database name |
TABLE_SCHEMA | VARCHAR(128) | Name of the SQL schema that contains the view. |
TABLE_NAME | VARCHAR(128) | Name of the view. |
VIEW_DEFINITION | CLOB(2M)
Nullable |
The query expression portion of the CREATE VIEW statement. |
CHECK_OPTION | VARCHAR(8) | The check option used on the view
|
IS_UPDATABLE | VARCHAR(3) | Specifies if the view is updatable:
|