The catalog includes the following views and tables in the SYSIBM library:
View Name | Description |
---|---|
SQLCOLPRIVILEGES | Information about privileges granted on columns |
SQLCOLUMNS | Information about column attributes |
SQLFOREIGNKEYS | Information about foreign keys |
SQLPRIMARYKEYS | Information about primary keys |
SQLPROCEDURECOLS | Information about procedure parameters |
SQLPROCEDURES | Information about procedures |
SQLSCHEMAS | Information about schemas |
SQLSPECIALCOLUMNS | Information about columns of a table that can be used to uniquely identify a row |
SQLSTATISTICS | Statistical information about tables |
SQLTABLEPRIVILEGES | Information about privileges granted on tables |
SQLTABLES | Information about tables |
SQLTYPEINFO | Information about the types of tables |
SQLUDTS | Information about built-in data types and distinct types |
The SQLCOLPRIVILEGES view contains one row for every privileges granted on a column. Note that this catalog view cannot be used to determine whether a user is authorized to a column because the privilege to use a column could be acquired through a group user profile or special authority (such as *ALLOBJ). Furthermore, the privilege to use a column is also acquired through privileges granted on the table. The following table describes the columns in the view:
Column Name | Data Type | Description |
---|---|---|
TABLE_CAT | VARCHAR(128) | Relational database name. |
TABLE_SCHEM | VARCHAR(128) | Name of the SQL schema that contains the table. |
TABLE_NAME | VARCHAR(128) | Table name. |
COLUMN_NAME | VARCHAR(128) | Column name. |
GRANTOR | VARCHAR(128)
Nullable |
Reserved. Contains the null value. |
GRANTEE | VARCHAR(128) | The user profile to which the privilege is granted. |
PRIVILEGE | VARCHAR(10) | The privilege granted:
|
IS_GRANTABLE | VARCHAR(3) | Indicates whether the privilege is grantable
to other users.
|
DBNAME | VARCHAR(8)
Nullable |
Reserved. The column contains the null value. |
The SQLCOLUMNS view contains one row for every column in a table, view, or alias. The following table describes the columns in the view:
Column Name | Data Type | Description |
---|---|---|
TABLE_CAT | VARCHAR(128) | Relational database name. |
TABLE_SCHEM | VARCHAR(128) | Name of the SQL schema that contains the table. |
TABLE_NAME | VARCHAR(128) | Table name. |
COLUMN_NAME | VARCHAR(128) | Column name. |
DATA_TYPE | SMALLINT | The data type of the column:
|
TYPE_NAME | VARCHAR(260) | The name of the data type of the column:
|
COLUMN_SIZE | INTEGER | The length of the column. |
BUFFER_LENGTH | INTEGER | Indicates the length of the column in a buffer. |
DECIMAL_DIGITS | SMALLINT
Nullable |
Indicates the number of digits for a numeric
column.
Contains the null value if the object is not numeric. |
NUM_PREC_RADIX | SMALLINT
Nullable |
Indicates the radix of a numeric column.
Contains the null value if the object is not numeric. |
NULLABLE | SMALLINT | Indicates whether the column can contain
the null value.
|
REMARKS | VARCHAR(2000)
Nullable |
A character string supplied with the COMMENT
statement.
Contains the null value if there is no long comment. |
COLUMN_DEF | VARCHAR(2000)
Nullable |
The default value of the column.
Contains the null value if there is no default value. |
SQL_DATA_TYPE | SMALLINT | Indicates the SQL data type of the column. |
SQL_DATETIME_SUB | SMALLINT
Nullable |
The datetime subtype of the data type:
Contains the null value if the column is not a datetime data type. |
CHAR_OCTET_LENGTH | INTEGER
Nullable |
Indicates the length in characters of the
column.
Contains the null value if the column is not a string. |
ORDINAL_POSITION | INTEGER | Indicates the ordinal position of the column in the table. |
IS_NULLABLE | VARCHAR(3) | Indicates whether the column can contain
the null value.
|
JDBC_DATA_TYPE | SMALLINT | Indicates the JDBC data type of the column.
|
SCOPE_CATALOG | VARCHAR(128)
Nullable |
Reserved. Contains the null value. |
SCOPE_SCHEMA | VARCHAR(128)
Nullable |
Reserved. Contains the null value. |
SCOPE_TABLE | VARCHAR(128)
Nullable |
Reserved. Contains the null value. |
SOURCE_DATA_TYPE | SMALLINT
Nullable |
The source data type if the data type of
the column is a distinct type.
Contains the null value if the data type is not a distinct type. |
DBNAME | VARCHAR(8)
Nullable |
Reserved. Contains the null value. |
PSEUDO_COLUMN | SMALLINT | Indicates whether this is a ROWID or identity
column.
|
COLUMN_TEXT | VARCHAR(50)
Nullable |
The text of the column.
Contains the null value if the column has no column text. |
SYSTEM_COLUMN_NAME | CHAR(10) | The system name of the column. |
I_DATA_TYPE | SMALLINT | Indicates the iSeries™ CLI data type of the column.
|
The SQLFOREIGNKEYS view contains one row for every referential constraint key on a table. The following table describes the columns in the view:
Column Name | Data Type | Description |
---|---|---|
PKTABLE_CAT | VARCHAR(128) | Relational database name |
PKTABLE_SCHEM | VARCHAR(128) | Name of the SQL schema containing the parent table. |
PKTABLE_NAME | VARCHAR(128) | Parent table name. |
PKCOLUMN_NAME | VARCHAR(128) | Parent key column name. |
FKTABLE_CAT | VARCHAR(128) | Relational database name |
FKTABLE_SCHEM | VARCHAR(128) | Name of the SQL schema containing the dependent table of the referential constraint. |
FKTABLE_NAME | VARCHAR(128) | Dependent table name of the referential constraint. |
FKCOLUMN_NAME | VARCHAR(128) | Dependent key name. |
KEY_SEQ | SMALLINT | The position of the column within the key. |
UPDATE_RULE | SMALLINT | Update Rule.
|
DELETE_RULE | SMALLINT | Delete Rule:
|
FK_NAME | VARCHAR(128) | Name of the referential constraint |
PK_NAME | VARCHAR(128) | Name of the unique constraint |
DEFERRABILITY | SMALLINT | Indicates whether the constraint checking can be deferred. Will always be 7. |
UNIQUE_OR_PRIMARY | CHAR(7) | Indicates the type of parent constraint:
|
The SQLPRIMARYKEYS view contains one row for every primary constraint key on a table. The following table describes the columns in the view:
Column Name | Data Type | Description |
---|---|---|
TABLE_CAT | VARCHAR(128) | Relational database name |
TABLE_SCHEM | VARCHAR(128) | Name of the schema containing the table with the primary key. |
TABLE_NAME | VARCHAR(128) | Name of the table with the primary key. |
COLUMN_NAME | VARCHAR(128) | Name of a primary key column. |
KEY_SEQ | SMALLINT | The position of the column within the key. |
PK_NAME | VARCHAR(128) | Name of the primary key constraint. |
The SQLPROCEDURECOLS view contains one row for every parameter of a procedure. The following table describes the columns in the view:
Column Name | Data Type | Description |
---|---|---|
PROCEDURE_CAT | VARCHAR(128) | Relational database name |
PROCEDURE_SCHEM | VARCHAR(128) | Schema name of the procedure instance. |
PROCEDURE_NAME | VARCHAR(128) | Name of the procedure instance. |
COLUMN_NAME | VARCHAR(128)
Nullable |
Name of a procedure parameter.
Contains the null value if the parameter does not have a name. |
COLUMN_TYPE | SMALLINT | Type of the parameter:
|
DATA_TYPE | SMALLINT | The data type of the parameter:
|
TYPE_NAME | VARCHAR(260) | The name of the data type of the parameter:
|
COLUMN_SIZE | INTEGER
Nullable |
Length of the parameter. |
BUFFER_LENGTH | INTEGER
Nullable |
Indicates the length of the parameter in a buffer. |
DECIMAL_DIGITS | SMALLINT
Nullable |
Scale of numeric or datetime data.
Contains the null value if the parameter is not decimal, numeric, binary, time or timestamp. |
NUM_PREC_RADIX | SMALLINT
Nullable |
Indicates if the precision specified in column
NUMERIC_PRECISION is specified as a number of binary or decimal digits:
Contains the null value if the parameter is not numeric. |
NULLABLE | SMALLINT | Indicates whether the parameter is nullable.
|
REMARKS | VARCHAR(2000)
Nullable |
A character string supplied with the COMMENT
statement.
Contains the null value if there is no long comment. |
COLUMN_DEF | VARCHAR(1)
Nullable |
The default value for the column.
Contains the null value if there is no default value. |
SQL_DATA_TYPE | SMALLINT | The SQL data type of the parameter:
|
SQL_DATETIME_SUB | SMALLINT
Nullable |
The datetime subtype of the parameter:
Contains the null value if the data type is not a datetime data type. |
CHAR_OCTET_LENGTH | INTEGER
Nullable |
Indicates the length in characters of the
parameter.
Contains the null value if the column is not a string. |
ORDINAL_POSITION | INTEGER | Numeric place of the parameter in the parameter list, ordered from left to right. |
IS_NULLABLE | VARCHAR(3) | Indicates whether the parameter is nullable.
|
JDBC_DATA_TYPE | INTEGER | The JDBC data type of the parameter:
|
I_DATA_TYPE | INTEGER | Indicates the iSeries CLI data type of the column.
|
The SQLPROCEDURES view contains one row for every procedure. The following table describes the columns in the view:
Column Name | Data Type | Description |
---|---|---|
PROCEDURE_CAT | VARCHAR(128) | Relational database name |
PROCEDURE_SCHEM | VARCHAR(128) | Name of the schema of the procedure instance. |
PROCEDURE_NAME | VARCHAR(128) | Name of the procedure. |
NUM_INPUT_PARAMS | SMALLINT | Identifies the number of input parameters. 0 indicates that there are no input parameters. |
NUM_OUTPUT_PARAMS | SMALLINT | Identifies the number of output parameters. 0 indicates that there are no output parameters. |
NUM_RESULT_SETS | SMALLINT | Identifies the maximum number of result sets returned. 0 indicates that there are no result sets. |
REMARKS | VARCHAR(2000)
Nullable |
A character string supplied with the COMMENT statement.
Contains the null value if there is no long comment. |
PROCEDURE_TYPE | SMALLINT | Reserved. Contains 0. |
NUM_INOUT_PARAMS | SMALLINT | Identifies the number of input/output parameters. 0 indicates that there are no input/output parameters. |
The SQLSCHEMAS view contains one row for every schema. The following table describes the columns in the view:
Column Name | Data Type | Description |
---|---|---|
TABLE_CAT | VARCHAR(128) | Relational database name |
TABLE_SCHEM | VARCHAR(128) | Name of the schema. |
TABLE_NAME | VARCHAR(128)
Nullable |
Reserved. Contains the null value. |
TABLE_TYPE | VARCHAR(128)
Nullable |
Reserved. Contains the null value. |
REMARKS | VARCHAR(2000)
Nullable |
Reserved. Contains the null value. |
TYPE_CAT | VARCHAR(128)
Nullable |
Reserved. Contains the null value. |
TYPE_SCHEM | VARCHAR(128)
Nullable |
Reserved. Contains the null value. |
TYPE_NAME | VARCHAR(128)
Nullable |
Reserved. Contains the null value. |
SELF_REF_COL_NAME | VARCHAR(128)
Nullable |
Reserved. Contains the null value. |
REF_GENERATION | VARCHAR(128)
Nullable |
Reserved. Contains the null value. |
DBNAME | VARCHAR(8)
Nullable |
Reserved. Contains the null value. |
SCHEMA_TEXT | VARCHAR(50)
Nullable |
A character string that describes the schema.
Contains the empty string if there is no text. |
The SQLSPECIALCOLUMNS view contains one row for every column of a primary key, unique constraint, or unique index that can identify a row of the table. The following table describes the columns in the view:
Column Name | Data Type | Description |
---|---|---|
SCOPE | SMALLINT | Reserved. Contains 0. |
COLUMN_NAME | VARCHAR(128) | Column name |
DATA_TYPE | SMALLINT | The data type of the column:
|
TYPE_NAME | VARCHAR(260) | The name of the data type of the column. |
COLUMN_SIZE | INTEGER | The length of the column. |
BUFFER_LENGTH | INTEGER | Indicates the length of the column in a buffer. |
DECIMAL_DIGITS | SMALLINT
Nullable |
Indicates the number of digits for a numeric column.
Contains the null value if the column is not numeric. |
PSEUDO_COLUMN | SMALLINT | Indicates whether this is a ROWID or identity
column.
|
TABLE_CAT | VARCHAR(128) | Relational database name |
TABLE_SCHEM | VARCHAR(128) | Name of the SQL schema that contains the table. |
TABLE_NAME | VARCHAR(128) | Name of the table. |
NULLABLE | SMALLINT | Indicates whether the column can contain
the null value.
|
JDBC_DATA_TYPE | SMALLINT | Indicates the JDBC data type of the column.
|
I_DATA_TYPE | SMALLINT | Indicates the iSeries CLI data type of the column.
|
The SQLSTATISTICS view contains statistic information on a table. The following table describes the columns in the view:
Column Name | Data Type | Description |
---|---|---|
TABLE_CAT | VARCHAR(128) | Relational database name |
TABLE_SCHEM | VARCHAR(128) | Name of the SQL schema of the table. |
TABLE_NAME | VARCHAR(128) | Name of the table. |
NON_UNIQUE | SMALLINT
Nullable |
Indicates whether an index prohibits duplicate
keys on the table.
Contains the null value if the TYPE is 0. |
INDEX_QUALIFIER | VARCHAR(128)
Nullable |
Name of the schema of the index.
Contains the null value if the TYPE is 0. |
INDEX_NAME | VARCHAR(128)
Nullable |
Name of the index.
Contains the null value if the TYPE is 0. |
TYPE | SMALLINT | Indicates the type of information returned:
|
ORDINAL_POSITION | SMALLINT
Nullable |
Indicates the ordinal position of the key
in the index.
Contains the null value if the TYPE is 0. |
COLUMN_NAME | VARCHAR(128)
Nullable |
Name of the column for a key in the index.
Contains the null value if the TYPE is 0. |
ASC_OR_DESC | CHAR(1)
Nullable |
Order of the column in the key:
Contains the null value if the TYPE is 0. |
CARDINALITY | INTEGER
Nullable |
Reserved. Contains the null value. |
PAGES | INTEGER
Nullable |
Reserved. Contains the null value. |
FILTER_CONDITION | VARCHAR(128)
Nullable |
Indicates whether the index is a select/omit
index.
Contains the null value if the TYPE is 0 or this is not a select/omit index. |
The SQLTABLEPRIVILEGES view contains one row for every privilege granted on a table. Note that this catalog view cannot be used to determine whether a user is authorized to a table or view because the privilege to use a table or view could be acquired through a group user profile or special authority (such as *ALLOBJ). The following table describes the columns in the view:
Column Name | Data Type | Description |
---|---|---|
TABLE_CAT | VARCHAR(128) | Relational database name |
TABLE_SCHEM | VARCHAR(128) | Name of the SQL schema of the table. |
TABLE_NAME | VARCHAR(128) | Name of the table. |
GRANTOR | VARCHAR(128)
Nullable |
Reserved. Contains the null value. |
GRANTEE | VARCHAR(128) | The user profile to which the privilege is granted. |
PRIVILEGE | VARCHAR(10) | The privilege granted:
|
IS_GRANTABLE | VARCHAR(3) | Indicates whether the privilege is grantable to other users.
|
DBNAME | VARCHAR(8)
Nullable |
Reserved. Contains the null value. |
The SQLTABLES view contains one row for every table, view, and alias. The following table describes the columns in the view:
Column Name | Data Type | Description |
---|---|---|
TABLE_CAT | VARCHAR(128) | Relational database name |
TABLE_SCHEM | VARCHAR(128) | Name of the schema containing the table. |
TABLE_NAME | VARCHAR(128) | Name of the table. |
TABLE_TYPE | VARCHAR(24) | Indicates the type of the table:
|
REMARKS | VARCHAR(2000)
Nullable |
A character string supplied with the COMMENT
statement.
Contains the null value if there is no long comment. |
TYPE_CAT | VARCHAR(128)
Nullable |
Reserved. Contains the null value. |
TYPE_SCHEM | VARCHAR(128)
Nullable |
Reserved. Contains the null value. |
TYPE_NAME | VARCHAR(128)
Nullable |
Reserved. Contains the null value. |
SELF_REF_COL_NAME | VARCHAR(128)
Nullable |
Reserved. Contains the null value. |
REF_GENERATION | VARCHAR(128)
Nullable |
Reserved. Contains the null value. |
DBNAME | VARCHAR(8)
Nullable |
Reserved. Contains the null value. |
TABLE_TEXT | VARCHAR(50) | A character string provided with the LABEL statement. |
The SQLTYPEINFO table contains one row for every built-in data type. The following table describes the columns in the table:
Column Name | Data Type | Description |
---|---|---|
TYPE_NAME | VARCHAR(128) | Name of the built-in data type:
|
DATA_TYPE | SMALLINT | The data type of the column:
|
COLUMN_SIZE | INTEGER
Nullable |
The maximum length of the data type. |
LITERAL_PREFIX | VARCHAR(128)
Nullable |
Indicates the prefix for a string literal.
Contains the null value if the data type is not a string. |
LITERAL_SUFFIX | VARCHAR(128)
Nullable |
Indicates the suffix for a string literal.
Contains the null value if the data type is not a string. |
CREATE_PARAMS | VARCHAR(128)
Nullable |
Indicates the parameters supported with the
data type.
Contains the null value for all other data types. |
NULLABLE | SMALLINT
Nullable |
Indicates whether the data type is nullable.
|
CASE_SENSITIVE | SMALLINT
Nullable |
Indicates whether the data type is case sensitive.
|
SEARCHABLE | SMALLINT
Nullable |
Indicates whether the data type can be used
in a predicate.
|
UNSIGNED_ATTRIBUTE | SMALLINT
Nullable |
Indicates whether the numeric data type is
signed or unsigned.
Contains the null value if the data type is not numeric. |
FIXED_PREC_SCALE | SMALLINT | Indicates whether the data type has a fixed
precision and scale.
|
AUTO_UNIQUE_VALUE | SMALLINT
Nullable |
Indicates whether the numeric data type is
auto-incrementing:
Contains the null value if the data type is not numeric. |
LOCAL_TYPE_NAME | VARCHAR(128)
Nullable |
Reserved. Contains the null value. |
MINIMUM_SCALE | SMALLINT
Nullable |
Indicates the minimum scale of numeric data
types.
Contains the null value if the data type is not numeric. |
MAXIMUM_SCALE | SMALLINT
Nullable |
Indicates the maximum scale of numeric data
types.
Contains the null value if the data type is not numeric. |
SQL_DATA_TYPE | SMALLINT
Nullable |
Indicates the SQL data type value of the
data type:
|
SQL_DATETIME_SUB | SMALLINT
Nullable |
The datetime subtype of the data type:
Contains the null value if the data type is not a datetime data type. |
NUM_PREC_RADIX | INTEGER
Nullable |
Indicates if the precision specified in column
NUMERIC_PRECISION is specified as a number of binary or decimal digits:
Contains the null value if the parameter is not numeric. |
INTERVAL_PRECISION | SMALLINT
Nullable |
Reserved. Contains the null value. |
JDBC_DATA_TYPE | SMALLINT | The JDBC data type value of the data type:
|
I_DATA_TYPE | SMALLINT | Indicates the iSeries CLI data type of the column.
|
The SQLUDTS view contains one row for every distinct type. The following table describes the columns in the view:
Column Name | Data Type | Description |
---|---|---|
TYPE_CAT | VARCHAR(128) | Relational database name |
TYPE_SCHEM | VARCHAR(128) | Name of the schema containing the user-defined type. |
TYPE_NAME | VARCHAR(128) | Name of the user-defined type. |
CLASS_NAME | VARCHAR(20) | Java™ class name of the user-defined type.
|
DATA_TYPE | SMALLINT | Reserved. Contains 2001. |
BASE_TYPE | SMALLINT | The source data type of the user-defined
data type:
|
REMARKS | VARCHAR(2000)
Nullable |
A character string supplied with the COMMENT
statement.
Contains the null value if there is no comment. |