H2 database logo   ▲
Translate

Home
Download
Cheat Sheet

Documentation
Quickstart
Installation
Tutorial
Features
Security
Performance
Advanced

Reference
Commands
Functions
• Aggregate • Window

Data Types
SQL Grammar
System Tables
Javadoc
PDF (2 MB)

Support
FAQ
Error Analyzer
Google Group

Appendix
History
License
Build
Links
MVStore
Architecture
Migration to 2.0

 

System Tables

Index

Information Schema

CHECK_CONSTRAINTS
COLLATIONS
COLUMNS
COLUMN_PRIVILEGES
CONSTANTS
CONSTRAINT_COLUMN_USAGE
DOMAINS
DOMAIN_CONSTRAINTS
ELEMENT_TYPES
ENUM_VALUES
FIELDS
INDEXES
INDEX_COLUMNS
INFORMATION_SCHEMA_CATALOG_NAME
IN_DOUBT
KEY_COLUMN_USAGE
LOCKS
PARAMETERS
QUERY_STATISTICS
REFERENTIAL_CONSTRAINTS
RIGHTS
ROLES
ROUTINES
SCHEMATA
SEQUENCES
SESSIONS
SESSION_STATE
SETTINGS
SYNONYMS
TABLES
TABLE_CONSTRAINTS
TABLE_PRIVILEGES
TRIGGERS
USERS
VIEWS

Range Table

Information Schema

The system tables and views in the schema INFORMATION_SCHEMA contain the meta data of all tables, views, domains, and other objects in the database as well as the current settings. This documentation describes the default new version of INFORMATION_SCHEMA for H2 2.0. Old TCP clients (1.4.200 and below) see the legacy version of INFORMATION_SCHEMA, because they can't work with the new one. The legacy version is not documented.

CHECK_CONSTRAINTS

Contains CHECK clauses of check and domain constraints.

CONSTRAINT_CATALOGCHARACTER VARYING
The catalog (database name).
CONSTRAINT_SCHEMACHARACTER VARYING
The schema of the constraint.
CONSTRAINT_NAMECHARACTER VARYING
The name of the constraint.
CHECK_CLAUSECHARACTER VARYING
The SQL of CHECK clause.

COLLATIONS

Contains available collations.

COLLATION_CATALOGCHARACTER VARYING
The catalog (database name) for character string data types.
COLLATION_SCHEMACHARACTER VARYING
The name of public schema for character string data types.
COLLATION_NAMECHARACTER VARYING
The name of collation for character string data types.
PAD_ATTRIBUTECHARACTER VARYING
'NO PAD'.
LANGUAGE_TAGCHARACTER VARYING
The language tag.

COLUMNS

Contains information about columns of tables.

TABLE_CATALOGCHARACTER VARYING
The catalog (database name).
TABLE_SCHEMACHARACTER VARYING
The schema of the table.
TABLE_NAMECHARACTER VARYING
The name of the table.
COLUMN_NAMECHARACTER VARYING
The name of the column.
ORDINAL_POSITIONINTEGER
The ordinal position (1-based).
COLUMN_DEFAULTCHARACTER VARYING
The SQL of DEFAULT expression, if any.
IS_NULLABLECHARACTER VARYING
Whether column may contain NULL value ('YES' or 'NO').
DATA_TYPECHARACTER VARYING
The SQL data type name.
CHARACTER_MAXIMUM_LENGTHBIGINT
The maximum length in characters for character string data types. For binary string data types contains the same value as CHARACTER_OCTET_LENGTH.
CHARACTER_OCTET_LENGTHBIGINT
The maximum length in bytes for binary string data types. For character string data types contains the same value as CHARACTER_MAXIMUM_LENGTH.
NUMERIC_PRECISIONINTEGER
The precision for numeric data types.
NUMERIC_PRECISION_RADIXINTEGER
The radix of precision (2 or 10) for numeric data types.
NUMERIC_SCALEINTEGER
The scale for numeric data types.
DATETIME_PRECISIONINTEGER
The fractional seconds precision for datetime data types.
INTERVAL_TYPECHARACTER VARYING
The data type of interval qualifier for interval data types.
INTERVAL_PRECISIONINTEGER
The leading field precision for interval data types.
CHARACTER_SET_CATALOGCHARACTER VARYING
The catalog (database name) for character string data types.
CHARACTER_SET_SCHEMACHARACTER VARYING
The name of public schema for character string data types.
CHARACTER_SET_NAMECHARACTER VARYING
The 'Unicode' for character string data types.
COLLATION_CATALOGCHARACTER VARYING
The catalog (database name) for character string data types.
COLLATION_SCHEMACHARACTER VARYING
The name of public schema for character string data types.
COLLATION_NAMECHARACTER VARYING
The name of collation for character string data types.
DOMAIN_CATALOGCHARACTER VARYING
The catalog for columns with domain.
DOMAIN_SCHEMACHARACTER VARYING
The schema of domain for columns with domain.
DOMAIN_NAMECHARACTER VARYING
The name of domain for columns with domain.
MAXIMUM_CARDINALITYINTEGER
The maximum cardinality for array data types.
DTD_IDENTIFIERCHARACTER VARYING
The data type identifier to read additional information from INFORMATION_SCHEMA.ELEMENT_TYPES for array data types, INFORMATION_SCHEMA.ENUM_VALUES for ENUM data type, and INFORMATION_SCHEMA.FIELDS for row value data types.
IS_IDENTITYCHARACTER VARYING
Whether column is an identity column ('YES' or 'NO').
IDENTITY_GENERATIONCHARACTER VARYING
Identity generation ('ALWAYS' or 'BY DEFAULT') for identity columns.
IDENTITY_STARTBIGINT
The initial start value for identity columns.
IDENTITY_INCREMENTBIGINT
The increment value for identity columns.
IDENTITY_MAXIMUMBIGINT
The maximum value for identity columns.
IDENTITY_MINIMUMBIGINT
The minimum value for identity columns.
IDENTITY_CYCLECHARACTER VARYING
Whether identity values are cycled ('YES' or 'NO') for identity columns.
IS_GENERATEDCHARACTER VARYING
Whether column is an generated column ('ALWAYS' or 'NEVER')
GENERATION_EXPRESSIONCHARACTER VARYING
The SQL of GENERATED ALWAYS AS expression for generated columns.
DECLARED_DATA_TYPECHARACTER VARYING
The declared SQL data type name for numeric data types.
DECLARED_NUMERIC_PRECISIONINTEGER
The declared precision, if any, for numeric data types.
DECLARED_NUMERIC_SCALEINTEGER
The declared scale, if any, for numeric data types.
GEOMETRY_TYPECHARACTER VARYING
The geometry type constraint, if any, for geometry data types.
GEOMETRY_SRIDINTEGER
The geometry SRID (Spatial Reference Identifier) constraint, if any, for geometry data types.
IDENTITY_BASEBIGINT
The current base value for identity columns.
IDENTITY_CACHEBIGINT
The cache size for identity columns.
COLUMN_ON_UPDATECHARACTER VARYING
The SQL of ON UPDATE expression, if any.
IS_VISIBLEBOOLEAN
Whether column is visible (included into SELECT *).
DEFAULT_ON_NULLBOOLEAN
Whether value of DEFAULT expression is used when NULL value is inserted.
SELECTIVITYINTEGER
The selectivity of a column (0-100), used to choose the best index.
REMARKSCHARACTER VARYING
Optional remarks.

COLUMN_PRIVILEGES

Contains information about privileges of columns. H2 doesn't have per-column privileges, so this view actually contains privileges of their tables.

GRANTORCHARACTER VARYING
NULL.
GRANTEECHARACTER VARYING
The name of grantee.
TABLE_CATALOGCHARACTER VARYING
The catalog (database name).
TABLE_SCHEMACHARACTER VARYING
The schema of the table.
TABLE_NAMECHARACTER VARYING
The name of the table.
COLUMN_NAMECHARACTER VARYING
The name of the column.
PRIVILEGE_TYPECHARACTER VARYING
'SELECT', 'INSERT', 'UPDATE', or 'DELETE'.
IS_GRANTABLECHARACTER VARYING
Whether grantee may grant rights to this object to others ('YES' or 'NO').

CONSTANTS

Contains information about constants.

CONSTANT_CATALOGCHARACTER VARYING
The catalog (database name).
CONSTANT_SCHEMACHARACTER VARYING
The schema of the constant.
CONSTANT_NAMECHARACTER VARYING
The name of the constant.
VALUE_DEFINITIONCHARACTER VARYING
The SQL of value.
DATA_TYPECHARACTER VARYING
The SQL data type name.
CHARACTER_MAXIMUM_LENGTHBIGINT
The maximum length in characters for character string data types. For binary string data types contains the same value as CHARACTER_OCTET_LENGTH.
CHARACTER_OCTET_LENGTHBIGINT
The maximum length in bytes for binary string data types. For character string data types contains the same value as CHARACTER_MAXIMUM_LENGTH.
CHARACTER_SET_CATALOGCHARACTER VARYING
The catalog (database name) for character string data types.
CHARACTER_SET_SCHEMACHARACTER VARYING
The name of public schema for character string data types.
CHARACTER_SET_NAMECHARACTER VARYING
The 'Unicode' for character string data types.
COLLATION_CATALOGCHARACTER VARYING
The catalog (database name) for character string data types.
COLLATION_SCHEMACHARACTER VARYING
The name of public schema for character string data types.
COLLATION_NAMECHARACTER VARYING
The name of collation for character string data types.
NUMERIC_PRECISIONINTEGER
The precision for numeric data types.
NUMERIC_PRECISION_RADIXINTEGER
The radix of precision (2 or 10) for numeric data types.
NUMERIC_SCALEINTEGER
The scale for numeric data types.
DATETIME_PRECISIONINTEGER
The fractional seconds precision for datetime data types.
INTERVAL_TYPECHARACTER VARYING
The data type of interval qualifier for interval data types.
INTERVAL_PRECISIONINTEGER
The leading field precision for interval data types.
MAXIMUM_CARDINALITYINTEGER
The maximum cardinality for array data types.
DTD_IDENTIFIERCHARACTER VARYING
The data type identifier to read additional information from INFORMATION_SCHEMA.ELEMENT_TYPES for array data types, INFORMATION_SCHEMA.ENUM_VALUES for ENUM data type, and INFORMATION_SCHEMA.FIELDS for row value data types.
DECLARED_DATA_TYPECHARACTER VARYING
The declared SQL data type name for numeric data types.
DECLARED_NUMERIC_PRECISIONINTEGER
The declared precision, if any, for numeric data types.
DECLARED_NUMERIC_SCALEINTEGER
The declared scale, if any, for numeric data types.
GEOMETRY_TYPECHARACTER VARYING
The geometry type constraint, if any, for geometry data types.
GEOMETRY_SRIDINTEGER
The geometry SRID (Spatial Reference Identifier) constraint, if any, for geometry data types.
REMARKSCHARACTER VARYING
Optional remarks.

CONSTRAINT_COLUMN_USAGE

Contains information about columns used in constraints.

TABLE_CATALOGCHARACTER VARYING
The catalog (database name).
TABLE_SCHEMACHARACTER VARYING
The schema of the table.
TABLE_NAMECHARACTER VARYING
The name of the table.
COLUMN_NAMECHARACTER VARYING
The name of the column.
CONSTRAINT_CATALOGCHARACTER VARYING
The catalog (database name).
CONSTRAINT_SCHEMACHARACTER VARYING
The schema of the constraint.
CONSTRAINT_NAMECHARACTER VARYING
The name of the constraint.

DOMAINS

Contains information about domains.

DOMAIN_CATALOGCHARACTER VARYING
The catalog (database name).
DOMAIN_SCHEMACHARACTER VARYING
The schema of domain.
DOMAIN_NAMECHARACTER VARYING
The name of domain.
DATA_TYPECHARACTER VARYING
The SQL data type name.
CHARACTER_MAXIMUM_LENGTHBIGINT
The maximum length in characters for character string data types. For binary string data types contains the same value as CHARACTER_OCTET_LENGTH.
CHARACTER_OCTET_LENGTHBIGINT
The maximum length in bytes for binary string data types. For character string data types contains the same value as CHARACTER_MAXIMUM_LENGTH.
CHARACTER_SET_CATALOGCHARACTER VARYING
The catalog (database name) for character string data types.
CHARACTER_SET_SCHEMACHARACTER VARYING
The name of public schema for character string data types.
CHARACTER_SET_NAMECHARACTER VARYING
The 'Unicode' for character string data types.
COLLATION_CATALOGCHARACTER VARYING
The catalog (database name) for character string data types.
COLLATION_SCHEMACHARACTER VARYING
The name of public schema for character string data types.
COLLATION_NAMECHARACTER VARYING
The name of collation for character string data types.
NUMERIC_PRECISIONINTEGER
The precision for numeric data types.
NUMERIC_PRECISION_RADIXINTEGER
The radix of precision (2 or 10) for numeric data types.
NUMERIC_SCALEINTEGER
The scale for numeric data types.
DATETIME_PRECISIONINTEGER
The fractional seconds precision for datetime data types.
INTERVAL_TYPECHARACTER VARYING
The data type of interval qualifier for interval data types.
INTERVAL_PRECISIONINTEGER
The leading field precision for interval data types.
DOMAIN_DEFAULTCHARACTER VARYING
The SQL of DEFAULT expression, if any.
MAXIMUM_CARDINALITYINTEGER
The maximum cardinality for array data types.
DTD_IDENTIFIERCHARACTER VARYING
The data type identifier to read additional information from INFORMATION_SCHEMA.ELEMENT_TYPES for array data types, INFORMATION_SCHEMA.ENUM_VALUES for ENUM data type, and INFORMATION_SCHEMA.FIELDS for row value data types.
DECLARED_DATA_TYPECHARACTER VARYING
The declared SQL data type name for numeric data types.
DECLARED_NUMERIC_PRECISIONINTEGER
The declared precision, if any, for numeric data types.
DECLARED_NUMERIC_SCALEINTEGER
The declared scale, if any, for numeric data types.
GEOMETRY_TYPECHARACTER VARYING
The geometry type constraint, if any, for geometry data types.
GEOMETRY_SRIDINTEGER
The geometry SRID (Spatial Reference Identifier) constraint, if any, for geometry data types.
DOMAIN_ON_UPDATECHARACTER VARYING
The SQL of ON UPDATE expression, if any.
PARENT_DOMAIN_CATALOGCHARACTER VARYING
The catalog (database name) for domains with parent domain.
PARENT_DOMAIN_SCHEMACHARACTER VARYING
The schema of parent domain for domains with parent domain.
PARENT_DOMAIN_NAMECHARACTER VARYING
The name of parent domain for domains with parent domain.
REMARKSCHARACTER VARYING
Optional remarks.

DOMAIN_CONSTRAINTS

Contains basic information about domain constraints. See also INFORMATION_SCHEMA.CHECK_CONSTRAINTS.

CONSTRAINT_CATALOGCHARACTER VARYING
The catalog (database name).
CONSTRAINT_SCHEMACHARACTER VARYING
The schema of the constraint.
CONSTRAINT_NAMECHARACTER VARYING
The name of the constraint.
DOMAIN_CATALOGCHARACTER VARYING
The catalog (database name).
DOMAIN_SCHEMACHARACTER VARYING
The schema of domain.
DOMAIN_NAMECHARACTER VARYING
The name of domain.
IS_DEFERRABLECHARACTER VARYING
'NO'.
INITIALLY_DEFERREDCHARACTER VARYING
'NO'.
REMARKSCHARACTER VARYING
Optional remarks.

ELEMENT_TYPES

Contains information about types of array elements.

OBJECT_CATALOGCHARACTER VARYING
The catalog (database name).
OBJECT_SCHEMACHARACTER VARYING
The schema of the object.
OBJECT_NAMECHARACTER VARYING
The name of the object.
OBJECT_TYPECHARACTER VARYING
The TYPE of the object ('CONSTANT', 'DOMAIN', 'TABLE', or 'ROUTINE').
COLLECTION_TYPE_IDENTIFIERCHARACTER VARYING
The DTD_IDENTIFIER value of the object.
DATA_TYPECHARACTER VARYING
The SQL data type name.
CHARACTER_MAXIMUM_LENGTHBIGINT
The maximum length in characters for character string data types. For binary string data types contains the same value as CHARACTER_OCTET_LENGTH.
CHARACTER_OCTET_LENGTHBIGINT
The maximum length in bytes for binary string data types. For character string data types contains the same value as CHARACTER_MAXIMUM_LENGTH.
CHARACTER_SET_CATALOGCHARACTER VARYING
The catalog (database name) for character string data types.
CHARACTER_SET_SCHEMACHARACTER VARYING
The name of public schema for character string data types.
CHARACTER_SET_NAMECHARACTER VARYING
The 'Unicode' for character string data types.
COLLATION_CATALOGCHARACTER VARYING
The catalog (database name) for character string data types.
COLLATION_SCHEMACHARACTER VARYING
The name of public schema for character string data types.
COLLATION_NAMECHARACTER VARYING
The name of collation for character string data types.
NUMERIC_PRECISIONINTEGER
The precision for numeric data types.
NUMERIC_PRECISION_RADIXINTEGER
The radix of precision (2 or 10) for numeric data types.
NUMERIC_SCALEINTEGER
The scale for numeric data types.
DATETIME_PRECISIONINTEGER
The fractional seconds precision for datetime data types.
INTERVAL_TYPECHARACTER VARYING
The data type of interval qualifier for interval data types.
INTERVAL_PRECISIONINTEGER
The leading field precision for interval data types.
MAXIMUM_CARDINALITYINTEGER
The maximum cardinality for array data types.
DTD_IDENTIFIERCHARACTER VARYING
The data type identifier to read additional information from INFORMATION_SCHEMA.ELEMENT_TYPES for array data types, INFORMATION_SCHEMA.ENUM_VALUES for ENUM data type, and INFORMATION_SCHEMA.FIELDS for row value data types.
DECLARED_DATA_TYPECHARACTER VARYING
The declared SQL data type name for numeric data types.
DECLARED_NUMERIC_PRECISIONINTEGER
The declared precision, if any, for numeric data types.
DECLARED_NUMERIC_SCALEINTEGER
The declared scale, if any, for numeric data types.
GEOMETRY_TYPECHARACTER VARYING
The geometry type constraint, if any, for geometry data types.
GEOMETRY_SRIDINTEGER
The geometry SRID (Spatial Reference Identifier) constraint, if any, for geometry data types.

ENUM_VALUES

Contains information about enum values.

OBJECT_CATALOGCHARACTER VARYING
The catalog (database name).
OBJECT_SCHEMACHARACTER VARYING
The schema of the object.
OBJECT_NAMECHARACTER VARYING
The name of the object.
OBJECT_TYPECHARACTER VARYING
The TYPE of the object ('CONSTANT', 'DOMAIN', 'TABLE', or 'ROUTINE').
ENUM_IDENTIFIERCHARACTER VARYING
The DTD_IDENTIFIER value of the object.
VALUE_NAMECHARACTER VARYING
The name of enum value.
VALUE_ORDINALCHARACTER VARYING
The ordinal of enum value.

FIELDS

Contains information about fields of row values.

OBJECT_CATALOGCHARACTER VARYING
The catalog (database name).
OBJECT_SCHEMACHARACTER VARYING
The schema of the object.
OBJECT_NAMECHARACTER VARYING
The name of the object.
OBJECT_TYPECHARACTER VARYING
The TYPE of the object ('CONSTANT', 'DOMAIN', 'TABLE', or 'ROUTINE').
ROW_IDENTIFIERCHARACTER VARYING
The DTD_IDENTIFIER value of the object.
FIELD_NAMECHARACTER VARYING
The name of the field of the row value.
ORDINAL_POSITIONINTEGER
The ordinal position (1-based).
DATA_TYPECHARACTER VARYING
The SQL data type name.
CHARACTER_MAXIMUM_LENGTHBIGINT
The maximum length in characters for character string data types. For binary string data types contains the same value as CHARACTER_OCTET_LENGTH.
CHARACTER_OCTET_LENGTHBIGINT
The maximum length in bytes for binary string data types. For character string data types contains the same value as CHARACTER_MAXIMUM_LENGTH.
CHARACTER_SET_CATALOGCHARACTER VARYING
The catalog (database name) for character string data types.
CHARACTER_SET_SCHEMACHARACTER VARYING
The name of public schema for character string data types.
CHARACTER_SET_NAMECHARACTER VARYING
The 'Unicode' for character string data types.
COLLATION_CATALOGCHARACTER VARYING
The catalog (database name) for character string data types.
COLLATION_SCHEMACHARACTER VARYING
The name of public schema for character string data types.
COLLATION_NAMECHARACTER VARYING
The name of collation for character string data types.
NUMERIC_PRECISIONINTEGER
The precision for numeric data types.
NUMERIC_PRECISION_RADIXINTEGER
The radix of precision (2 or 10) for numeric data types.
NUMERIC_SCALEINTEGER
The scale for numeric data types.
DATETIME_PRECISIONINTEGER
The fractional seconds precision for datetime data types.
INTERVAL_TYPECHARACTER VARYING
The data type of interval qualifier for interval data types.
INTERVAL_PRECISIONINTEGER
The leading field precision for interval data types.
MAXIMUM_CARDINALITYINTEGER
The maximum cardinality for array data types.
DTD_IDENTIFIERCHARACTER VARYING
The data type identifier to read additional information from INFORMATION_SCHEMA.ELEMENT_TYPES for array data types, INFORMATION_SCHEMA.ENUM_VALUES for ENUM data type, and INFORMATION_SCHEMA.FIELDS for row value data types.
DECLARED_DATA_TYPECHARACTER VARYING
The declared SQL data type name for numeric data types.
DECLARED_NUMERIC_PRECISIONINTEGER
The declared precision, if any, for numeric data types.
DECLARED_NUMERIC_SCALEINTEGER
The declared scale, if any, for numeric data types.
GEOMETRY_TYPECHARACTER VARYING
The geometry type constraint, if any, for geometry data types.
GEOMETRY_SRIDINTEGER
The geometry SRID (Spatial Reference Identifier) constraint, if any, for geometry data types.

INDEXES

Contains information about indexes.

INDEX_CATALOGCHARACTER VARYING
The catalog (database name).
INDEX_SCHEMACHARACTER VARYING
The schema of the index.
INDEX_NAMECHARACTER VARYING
The name of the index.
TABLE_CATALOGCHARACTER VARYING
The catalog (database name).
TABLE_SCHEMACHARACTER VARYING
The schema of the table.
TABLE_NAMECHARACTER VARYING
The name of the table.
INDEX_TYPE_NAMECHARACTER VARYING
The type of the index ('PRIMARY KEY', 'UNIQUE INDEX', 'SPATIAL INDEX', etc.)
NULLS_DISTINCTCHARACTER VARYING
'YES' for unique indexes with distinct null values, 'NO' for unique indexes with not distinct null values, 'ALL' for multi-column unique indexes where only rows with null values in all unique columns are distinct, NULL for other types of indexes.
IS_GENERATEDBOOLEAN
Whether index is generated by a constraint and belongs to it.
REMARKSCHARACTER VARYING
Optional remarks.
INDEX_CLASSCHARACTER VARYING
The Java class name of index implementation.

INDEX_COLUMNS

Contains information about columns used in indexes.

INDEX_CATALOGCHARACTER VARYING
The catalog (database name).
INDEX_SCHEMACHARACTER VARYING
The schema of the index.
INDEX_NAMECHARACTER VARYING
The name of the index.
TABLE_CATALOGCHARACTER VARYING
The catalog (database name).
TABLE_SCHEMACHARACTER VARYING
The schema of the table.
TABLE_NAMECHARACTER VARYING
The name of the table.
COLUMN_NAMECHARACTER VARYING
The name of the column.
ORDINAL_POSITIONINTEGER
The ordinal position (1-based).
ORDERING_SPECIFICATIONCHARACTER VARYING
'ASC' or 'DESC'.
NULL_ORDERINGCHARACTER VARYING
'FIRST', 'LAST', or NULL.
IS_UNIQUEBOOLEAN
Whether this column is a part of unique column list of a unique index (TRUE or FALSE).

INFORMATION_SCHEMA_CATALOG_NAME

Contains a single row with the name of catalog (database name).

CATALOG_NAMECHARACTER VARYING
The catalog (database name).

IN_DOUBT

Contains information about prepared transactions.

TRANSACTION_NAMECHARACTER VARYING
The name of prepared transaction.
TRANSACTION_STATECHARACTER VARYING
The state of prepared transaction ('IN_DOUBT', 'COMMIT', or 'ROLLBACK').

KEY_COLUMN_USAGE

Contains information about columns used by primary key, unique, or referential constraint.

CONSTRAINT_CATALOGCHARACTER VARYING
The catalog (database name).
CONSTRAINT_SCHEMACHARACTER VARYING
The schema of the constraint.
CONSTRAINT_NAMECHARACTER VARYING
The name of the constraint.
TABLE_CATALOGCHARACTER VARYING
The catalog (database name).
TABLE_SCHEMACHARACTER VARYING
The schema of the table.
TABLE_NAMECHARACTER VARYING
The name of the table.
COLUMN_NAMECHARACTER VARYING
The name of the column.
ORDINAL_POSITIONINTEGER
The ordinal position (1-based).
POSITION_IN_UNIQUE_CONSTRAINTINTEGER
The ordinal position in the referenced unique constraint (1-based).

LOCKS

Contains information about tables locked by sessions.

TABLE_SCHEMACHARACTER VARYING
The schema of the table.
TABLE_NAMECHARACTER VARYING
The name of the table.
SESSION_IDINTEGER
The identifier of the session.
LOCK_TYPECHARACTER VARYING
'READ' or 'WRITE'.

PARAMETERS

Contains information about parameters of routines.

SPECIFIC_CATALOGCHARACTER VARYING
The catalog (database name).
SPECIFIC_SCHEMACHARACTER VARYING
The schema of the overloaded version of routine.
SPECIFIC_NAMECHARACTER VARYING
The name of the overloaded version of routine.
ORDINAL_POSITIONINTEGER
The ordinal position (1-based).
PARAMETER_MODECHARACTER VARYING
'IN'.
IS_RESULTCHARACTER VARYING
'NO'.
AS_LOCATORCHARACTER VARYING
'YES' for LOBs, 'NO' for others.
PARAMETER_NAMECHARACTER VARYING
The name of the parameter.
DATA_TYPECHARACTER VARYING
The SQL data type name.
CHARACTER_MAXIMUM_LENGTHBIGINT
The maximum length in characters for character string data types. For binary string data types contains the same value as CHARACTER_OCTET_LENGTH.
CHARACTER_OCTET_LENGTHBIGINT
The maximum length in bytes for binary string data types. For character string data types contains the same value as CHARACTER_MAXIMUM_LENGTH.
CHARACTER_SET_CATALOGCHARACTER VARYING
The catalog (database name) for character string data types.
CHARACTER_SET_SCHEMACHARACTER VARYING
The name of public schema for character string data types.
CHARACTER_SET_NAMECHARACTER VARYING
The 'Unicode' for character string data types.
COLLATION_CATALOGCHARACTER VARYING
The catalog (database name) for character string data types.
COLLATION_SCHEMACHARACTER VARYING
The name of public schema for character string data types.
COLLATION_NAMECHARACTER VARYING
The name of collation for character string data types.
NUMERIC_PRECISIONINTEGER
The precision for numeric data types.
NUMERIC_PRECISION_RADIXINTEGER
The radix of precision (2 or 10) for numeric data types.
NUMERIC_SCALEINTEGER
The scale for numeric data types.
DATETIME_PRECISIONINTEGER
The fractional seconds precision for datetime data types.
INTERVAL_TYPECHARACTER VARYING
The data type of interval qualifier for interval data types.
INTERVAL_PRECISIONINTEGER
The leading field precision for interval data types.
MAXIMUM_CARDINALITYINTEGER
The maximum cardinality for array data types.
DTD_IDENTIFIERCHARACTER VARYING
The data type identifier to read additional information from INFORMATION_SCHEMA.ELEMENT_TYPES for array data types, INFORMATION_SCHEMA.ENUM_VALUES for ENUM data type, and INFORMATION_SCHEMA.FIELDS for row value data types.
DECLARED_DATA_TYPECHARACTER VARYING
The declared SQL data type name for numeric data types.
DECLARED_NUMERIC_PRECISIONINTEGER
The declared precision, if any, for numeric data types.
DECLARED_NUMERIC_SCALEINTEGER
The declared scale, if any, for numeric data types.
PARAMETER_DEFAULTCHARACTER VARYING
NULL.
GEOMETRY_TYPECHARACTER VARYING
The geometry type constraint, if any, for geometry data types.
GEOMETRY_SRIDINTEGER
The geometry SRID (Spatial Reference Identifier) constraint, if any, for geometry data types.

QUERY_STATISTICS

Contains statistics of queries when query statistics gathering is enabled.

SQL_STATEMENTCHARACTER VARYING
The SQL statement.
EXECUTION_COUNTINTEGER
The execution count.
MIN_EXECUTION_TIMEDOUBLE PRECISION
The minimum execution time in milliseconds.
MAX_EXECUTION_TIMEDOUBLE PRECISION
The maximum execution time in milliseconds.
CUMULATIVE_EXECUTION_TIMEDOUBLE PRECISION
The total execution time in milliseconds.
AVERAGE_EXECUTION_TIMEDOUBLE PRECISION
The average execution time in milliseconds.
STD_DEV_EXECUTION_TIMEDOUBLE PRECISION
The standard deviation of execution time in milliseconds.
MIN_ROW_COUNTBIGINT
The minimum number of rows.
MAX_ROW_COUNTBIGINT
The maximum number of rows.
CUMULATIVE_ROW_COUNTBIGINT
The total number of rows.
AVERAGE_ROW_COUNTDOUBLE PRECISION
The average number of rows.
STD_DEV_ROW_COUNTDOUBLE PRECISION
The standard deviation of number of rows.

REFERENTIAL_CONSTRAINTS

Contains additional information about referential constraints.

CONSTRAINT_CATALOGCHARACTER VARYING
The catalog (database name).
CONSTRAINT_SCHEMACHARACTER VARYING
The schema of the constraint.
CONSTRAINT_NAMECHARACTER VARYING
The name of the constraint.
UNIQUE_CONSTRAINT_CATALOGCHARACTER VARYING
The catalog (database name).
UNIQUE_CONSTRAINT_SCHEMACHARACTER VARYING
The schema of referenced unique constraint.
UNIQUE_CONSTRAINT_NAMECHARACTER VARYING
The name of referenced unique constraint.
MATCH_OPTIONCHARACTER VARYING
'NONE'.
UPDATE_RULECHARACTER VARYING
The rule for UPDATE in referenced table ('RESTRICT', 'CASCADE', 'SET DEFAULT', or 'SET NULL').
DELETE_RULECHARACTER VARYING
The rule for DELETE in referenced table ('RESTRICT', 'CASCADE', 'SET DEFAULT', or 'SET NULL').

RIGHTS

Contains information about granted rights and roles.

GRANTEECHARACTER VARYING
The name of grantee.
GRANTEETYPECHARACTER VARYING
'USER' if grantee is a user, 'ROLE' if grantee is a role.
GRANTEDROLECHARACTER VARYING
The name of the granted role for role grants.
RIGHTSCHARACTER VARYING
The set of rights ('SELECT', 'DELETE', 'INSERT', 'UPDATE', or 'ALTER ANY SCHEMA' separated with ', ') for table grants.
TABLE_SCHEMACHARACTER VARYING
The schema of the table.
TABLE_NAMECHARACTER VARYING
The name of the table.

ROLES

Contains information about roles.

ROLE_NAMECHARACTER VARYING
The name of the role.
REMARKSCHARACTER VARYING
Optional remarks.

ROUTINES

Contains information about user-defined routines, including aggregate functions.

SPECIFIC_CATALOGCHARACTER VARYING
The catalog (database name).
SPECIFIC_SCHEMACHARACTER VARYING
The schema of the overloaded version of routine.
SPECIFIC_NAMECHARACTER VARYING
The name of the overloaded version of routine.
ROUTINE_CATALOGCHARACTER VARYING
The catalog (database name).
ROUTINE_SCHEMACHARACTER VARYING
The schema of the routine.
ROUTINE_NAMECHARACTER VARYING
The name of the routine.
ROUTINE_TYPECHARACTER VARYING
'PROCEDURE', 'FUNCTION', or 'AGGREGATE'.
DATA_TYPECHARACTER VARYING
The SQL data type name.
CHARACTER_MAXIMUM_LENGTHBIGINT
The maximum length in characters for character string data types. For binary string data types contains the same value as CHARACTER_OCTET_LENGTH.
CHARACTER_OCTET_LENGTHBIGINT
The maximum length in bytes for binary string data types. For character string data types contains the same value as CHARACTER_MAXIMUM_LENGTH.
CHARACTER_SET_CATALOGCHARACTER VARYING
The catalog (database name) for character string data types.
CHARACTER_SET_SCHEMACHARACTER VARYING
The name of public schema for character string data types.
CHARACTER_SET_NAMECHARACTER VARYING
The 'Unicode' for character string data types.
COLLATION_CATALOGCHARACTER VARYING
The catalog (database name) for character string data types.
COLLATION_SCHEMACHARACTER VARYING
The name of public schema for character string data types.
COLLATION_NAMECHARACTER VARYING
The name of collation for character string data types.
NUMERIC_PRECISIONINTEGER
The precision for numeric data types.
NUMERIC_PRECISION_RADIXINTEGER
The radix of precision (2 or 10) for numeric data types.
NUMERIC_SCALEINTEGER
The scale for numeric data types.
DATETIME_PRECISIONINTEGER
The fractional seconds precision for datetime data types.
INTERVAL_TYPECHARACTER VARYING
The data type of interval qualifier for interval data types.
INTERVAL_PRECISIONINTEGER
The leading field precision for interval data types.
MAXIMUM_CARDINALITYINTEGER
The maximum cardinality for array data types.
DTD_IDENTIFIERCHARACTER VARYING
The data type identifier to read additional information from INFORMATION_SCHEMA.ELEMENT_TYPES for array data types, INFORMATION_SCHEMA.ENUM_VALUES for ENUM data type, and INFORMATION_SCHEMA.FIELDS for row value data types.
ROUTINE_BODYCHARACTER VARYING
'EXTERNAL'.
ROUTINE_DEFINITIONCHARACTER VARYING
Source code or NULL if not applicable or user doesn't have ADMIN privileges.
EXTERNAL_NAMECHARACTER VARYING
The name of the class or method.
EXTERNAL_LANGUAGECHARACTER VARYING
'JAVA'.
PARAMETER_STYLECHARACTER VARYING
'GENERAL'.
IS_DETERMINISTICCHARACTER VARYING
Whether routine is deterministic ('YES' or 'NO').
DECLARED_DATA_TYPECHARACTER VARYING
The declared SQL data type name for numeric data types.
DECLARED_NUMERIC_PRECISIONINTEGER
The declared precision, if any, for numeric data types.
DECLARED_NUMERIC_SCALEINTEGER
The declared scale, if any, for numeric data types.
GEOMETRY_TYPECHARACTER VARYING
The geometry type constraint, if any, for geometry data types.
GEOMETRY_SRIDINTEGER
The geometry SRID (Spatial Reference Identifier) constraint, if any, for geometry data types.
REMARKSCHARACTER VARYING
Optional remarks.

SCHEMATA

Contains information about schemas.

CATALOG_NAMECHARACTER VARYING
The catalog (database name).
SCHEMA_NAMECHARACTER VARYING
The schema name.
SCHEMA_OWNERCHARACTER VARYING
The name of schema owner.
DEFAULT_CHARACTER_SET_CATALOGCHARACTER VARYING
The catalog (database name).
DEFAULT_CHARACTER_SET_SCHEMACHARACTER VARYING
The name of public schema.
DEFAULT_CHARACTER_SET_NAMECHARACTER VARYING
'Unicode'.
SQL_PATHCHARACTER VARYING
NULL.
DEFAULT_COLLATION_NAMECHARACTER VARYING
The name of database collation.
REMARKSCHARACTER VARYING
Optional remarks.

SEQUENCES

Contains information about sequences.

SEQUENCE_CATALOGCHARACTER VARYING
The catalog (database name).
SEQUENCE_SCHEMACHARACTER VARYING
The schema of the sequence.
SEQUENCE_NAMECHARACTER VARYING
The name of the sequence.
DATA_TYPECHARACTER VARYING
The SQL data type name.
NUMERIC_PRECISIONINTEGER
The precision for numeric data types.
NUMERIC_PRECISION_RADIXINTEGER
The radix of precision (2 or 10) for numeric data types.
NUMERIC_SCALEINTEGER
The scale for numeric data types.
START_VALUEBIGINT
The initial start value.
MINIMUM_VALUEBIGINT
The minimum value.
MAXIMUM_VALUEBIGINT
The maximum value.
INCREMENTBIGINT
The increment value.
CYCLE_OPTIONCHARACTER VARYING
Whether values are cycled ('YES' or 'NO').
DECLARED_DATA_TYPECHARACTER VARYING
The declared SQL data type name for numeric data types.
DECLARED_NUMERIC_PRECISIONINTEGER
The declared precision, if any, for numeric data types.
DECLARED_NUMERIC_SCALEINTEGER
The declared scale, if any, for numeric data types.
BASE_VALUEBIGINT
The current base value.
CACHEBIGINT
The cache size.
REMARKSCHARACTER VARYING
Optional remarks.

SESSIONS

Contains information about sessions. Only users with ADMIN privileges can see all sessions, other users can see only own session.

SESSION_IDINTEGER
The identifier of the session.
USER_NAMECHARACTER VARYING
The name of the user.
SERVERCHARACTER VARYING
The name of the server used by remote connection.
CLIENT_ADDRCHARACTER VARYING
The client address and port used by remote connection.
CLIENT_INFOCHARACTER VARYING
Additional client information provided by remote connection.
SESSION_STARTTIMESTAMP(9) WITH TIME ZONE
When this session was started.
ISOLATION_LEVELCHARACTER VARYING
The isolation level of the session ('READ UNCOMMITTED', 'READ COMMITTED', 'REPEATABLE READ', 'SNAPSHOT', or 'SERIALIZABLE').
EXECUTING_STATEMENTCHARACTER VARYING
The currently executing statement, if any.
EXECUTING_STATEMENT_STARTTIMESTAMP(9) WITH TIME ZONE
When the current command was started, if any.
CONTAINS_UNCOMMITTEDBOOLEAN
Whether the session contains any uncommitted changes.
SESSION_STATECHARACTER VARYING
The state of the session ('RUNNING', 'SLEEP', etc.)
BLOCKER_IDINTEGER
The identifier or blocking session, if any.
SLEEP_SINCETIMESTAMP(9) WITH TIME ZONE
When the last command was finished if session is sleeping.

SESSION_STATE

Contains the state of the current session.

STATE_KEYCHARACTER VARYING
The key.
STATE_COMMANDCHARACTER VARYING
The SQL command that can be used to restore the state.

SETTINGS

Contains values of various settings.

SETTING_NAMECHARACTER VARYING
The name of the setting.
SETTING_VALUECHARACTER VARYING
The value of the setting.

SYNONYMS

Contains information about table synonyms.

SYNONYM_CATALOGCHARACTER VARYING
The catalog (database name).
SYNONYM_SCHEMACHARACTER VARYING
The schema of the synonym.
SYNONYM_NAMECHARACTER VARYING
The name of the synonym.
SYNONYM_FORCHARACTER VARYING
The name of the referenced table.
SYNONYM_FOR_SCHEMACHARACTER VARYING
The name of the referenced schema.
TYPE_NAMECHARACTER VARYING
'SYNONYM'.
STATUSCHARACTER VARYING
'VALID'.
REMARKSCHARACTER VARYING
Optional remarks.

TABLES

Contains information about tables. See also INFORMATION_SCHEMA.COLUMNS.

TABLE_CATALOGCHARACTER VARYING
The catalog (database name).
TABLE_SCHEMACHARACTER VARYING
The schema of the table.
TABLE_NAMECHARACTER VARYING
The name of the table.
TABLE_TYPECHARACTER VARYING
'BASE TABLE', 'VIEW', 'GLOBAL TEMPORARY', or 'LOCAL TEMPORARY'.
IS_INSERTABLE_INTOCHARACTER VARYING
Whether the table is insertable ('YES' or 'NO').
COMMIT_ACTIONCHARACTER VARYING
'DELETE', 'DROP', or 'PRESERVE' for temporary tables.
STORAGE_TYPECHARACTER VARYING
'CACHED' for regular persisted tables, 'MEMORY' for in-memory tables or persisted tables with in-memory indexes, 'GLOBAL TEMPORARY' or 'LOCAL TEMPORARY' for temporary tables, 'EXTERNAL' for tables with external table engines, or 'TABLE LINK' for linked tables.
REMARKSCHARACTER VARYING
Optional remarks.
LAST_MODIFICATIONBIGINT
The sequence number of the last modification, if applicable.
TABLE_CLASSCHARACTER VARYING
The Java class name of implementation.
ROW_COUNT_ESTIMATEBIGINT
The approximate number of rows if known or some default value if unknown. For regular tables contains the total number of rows including the uncommitted rows.

TABLE_CONSTRAINTS

Contains basic information about table constraints (check, primary key, unique, and referential).

CONSTRAINT_CATALOGCHARACTER VARYING
The catalog (database name).
CONSTRAINT_SCHEMACHARACTER VARYING
The schema of the constraint.
CONSTRAINT_NAMECHARACTER VARYING
The name of the constraint.
CONSTRAINT_TYPECHARACTER VARYING
'CHECK', 'PRIMARY KEY', 'UNIQUE', or 'REFERENTIAL'.
TABLE_CATALOGCHARACTER VARYING
The catalog (database name).
TABLE_SCHEMACHARACTER VARYING
The schema of the table.
TABLE_NAMECHARACTER VARYING
The name of the table.
IS_DEFERRABLECHARACTER VARYING
'NO'.
INITIALLY_DEFERREDCHARACTER VARYING
'NO'.
ENFORCEDCHARACTER VARYING
'YES' for non-referential constants. 'YES' for referential constants when checks for referential integrity are enabled for the both referenced and referencing tables and 'NO' when they are disabled.
NULLS_DISTINCTCHARACTER VARYING
'YES' for unique constraints with distinct null values, 'NO' for unique constraints with not distinct null values, 'ALL' for multi-column unique constraints where only rows with null values in all unique columns are distinct, NULL for other types of constraints.
INDEX_CATALOGCHARACTER VARYING
The catalog (database name).
INDEX_SCHEMACHARACTER VARYING
The schema of the index.
INDEX_NAMECHARACTER VARYING
The name of the index.
REMARKSCHARACTER VARYING
Optional remarks.

TABLE_PRIVILEGES

Contains information about privileges of tables. See INFORMATION_SCHEMA.CHECK_CONSTRAINTS, INFORMATION_SCHEMA.KEY_COLUMN_USAGE, and INFORMATION_SCHEMA.REFERENTIAL_CONSTRAINTS for additional information.

GRANTORCHARACTER VARYING
NULL.
GRANTEECHARACTER VARYING
The name of grantee.
TABLE_CATALOGCHARACTER VARYING
The catalog (database name).
TABLE_SCHEMACHARACTER VARYING
The schema of the table.
TABLE_NAMECHARACTER VARYING
The name of the table.
PRIVILEGE_TYPECHARACTER VARYING
'SELECT', 'INSERT', 'UPDATE', or 'DELETE'.
IS_GRANTABLECHARACTER VARYING
Whether grantee may grant rights to this object to others ('YES' or 'NO').
WITH_HIERARCHYCHARACTER VARYING
'NO'.

TRIGGERS

Contains information about triggers.

TRIGGER_CATALOGCHARACTER VARYING
The catalog (database name).
TRIGGER_SCHEMACHARACTER VARYING
The schema of the trigger.
TRIGGER_NAMECHARACTER VARYING
The name of the trigger.
EVENT_MANIPULATIONCHARACTER VARYING
'INSERT', 'UPDATE', 'DELETE', or 'SELECT'.
EVENT_OBJECT_CATALOGCHARACTER VARYING
The catalog (database name).
EVENT_OBJECT_SCHEMACHARACTER VARYING
The schema of the table.
EVENT_OBJECT_TABLECHARACTER VARYING
The name of the table.
ACTION_ORIENTATIONCHARACTER VARYING
'ROW' or 'STATEMENT'.
ACTION_TIMINGCHARACTER VARYING
'BEFORE', 'AFTER', or 'INSTEAD OF'.
IS_ROLLBACKBOOLEAN
Whether this trigger is executed on rollback.
JAVA_CLASSCHARACTER VARYING
The Java class name.
QUEUE_SIZEINTEGER
The size of the queue (is not actually used).
NO_WAITBOOLEAN
Whether trigger is defined with NO WAIT clause (is not actually used).
REMARKSCHARACTER VARYING
Optional remarks.

USERS

Contains information about users. Only users with ADMIN privileges can see all users, other users can see only themselves.

USER_NAMECHARACTER VARYING
The name of the user.
IS_ADMINBOOLEAN
Whether user has ADMIN privileges.
REMARKSCHARACTER VARYING
Optional remarks.

VIEWS

Contains additional information about views. See INFORMATION_SCHEMA.TABLES for basic information.

TABLE_CATALOGCHARACTER VARYING
The catalog (database name).
TABLE_SCHEMACHARACTER VARYING
The schema of the table.
TABLE_NAMECHARACTER VARYING
The name of the table.
VIEW_DEFINITIONCHARACTER VARYING
The query SQL, if applicable.
CHECK_OPTIONCHARACTER VARYING
'NONE'.
IS_UPDATABLECHARACTER VARYING
'NO'.
INSERTABLE_INTOCHARACTER VARYING
'NO'.
IS_TRIGGER_UPDATABLECHARACTER VARYING
Whether the view has INSTEAD OF trigger for UPDATE ('YES' or 'NO').
IS_TRIGGER_DELETABLECHARACTER VARYING
Whether the view has INSTEAD OF trigger for DELETE ('YES' or 'NO').
IS_TRIGGER_INSERTABLE_INTOCHARACTER VARYING
Whether the view has INSTEAD OF trigger for INSERT ('YES' or 'NO').
STATUSCHARACTER VARYING
'VALID' or 'INVALID'.
REMARKSCHARACTER VARYING
Optional remarks.

Range Table

The range table is a dynamic system table that contains all values from a start to an end value. Non-zero step value may be also specified, default is 1. Start value, end value, and optional step value are converted to BIGINT data type. The table contains one column called X. If start value is greater than end value and step is positive the result is empty. If start value is less than end value and step is negative the result is empty too. If start value is equal to end value the result contains only start value. Start value, start value plus step, start value plus step multiplied by two and so on are included in result. If step is positive the last value is less than or equal to the specified end value. If step in negative the last value is greater than or equal to the specified end value. The table is used as follows:

Examples:

SELECT X FROM SYSTEM_RANGE(1, 10);
-- 1, 2, 3, 4, 5, 6, 7, 8, 9, 10
SELECT X FROM SYSTEM_RANGE(1, 10, 2);
-- 1, 3, 5, 7, 9
SELECT X FROM SYSTEM_RANGE(1, 10, -1);
-- No rows
SELECT X FROM SYSTEM_RANGE(10, 2, -2);
-- 10, 8, 6, 4, 2