Chapter 16 – SQL Catalogs¶
In this chapter, we’ll describe SQL Catalogs in detail, and show you the syntax to use to create, alter and destroy them.
Table of Contents
- Catalog
- Catalog Names:
- The Information Schema
- INFORMATION_SCHEMA Base tables
- INFORMATION_SCHEMA Assertions
- INFORMATION_SCHEMA Domains
- INFORMATION_SCHEMA Views
- INFORMATION_SCHEMA.ADMINISTRABLE_ROLE_AUTHORIZATIONS
- INFORMATION_SCHEMA.APPLICABLE_ROLES
- INFORMATION_SCHEMA.ASSERTIONS
- INFORMATION_SCHEMA.ATTRIBUTES
- INFORMATION_SCHEMA.CHARACTER_SETS
- INFORMATION_SCHEMA.CHECK_CONSTRAINTS
- INFORMATION_SCHEMA.COLLATIONS
- INFORMATION_SCHEMA.COLUMNS
- INFORMATION_SCHEMA.COLUMN_DOMAIN_USAGE
- INFORMATION_SCHEMA.COLUMN_PRIVILEGES
- INFORMATION_SCHEMA.COLUMN_USER_DEFINED_TYPE_USAGE
- INFORMATION_SCHEMA.CONSTRAINT_COLUMN_USAGE
- INFORMATION_SCHEMA.CONSTRAINT_TABLE_USAGE
- INFORMATION_SCHEMA.DIRECT_SUPERTABLES
- INFORMATION_SCHEMA.DIRECT_SUPERTYPES
- INFORMATION_SCHEMA.DOMAINS
- INFORMATION_SCHEMA.DOMAIN_CONSTRAINTS
- INFORMATION_SCHEMA.DOMAIN_USER_DEFINED_TYPE_USAGE
- INFORMATION_SCHEMA.ENABLED_ROLES
- INFORMATION_SCHEMA.KEY_COLUMN_USAGE
- INFORMATION_SCHEMA.METHOD_SPECIFICATION
- INFORMATION_SCHEMA.METHOD_SIGNATURE_PARAMETERS
- INFORMATION_SCHEMA.PARAMETERS
- INFORMATION_SCHEMA.REFERENTIAL_CONSTRAINTS
- INFORMATION_SCHEMA.ROLE_COLUMN_GRANTS
- INFORMATION_SCHEMA.ROLE_ROUTINE_GRANTS
- INFORMATION_SCHEMA.ROLE_TABLE_GRANTS
- INFORMATION_SCHEMA.ROLE_USAGE_GRANTS
- INFORMATION_SCHEMA.ROLE_USER_DEFINED_TYPE_GRANTS
- INFORMATION_SCHEMA.ROUTINES
- INFORMATION_SCHEMA.ROUTINE_COLUMN_USAGE
- INFORMATION_SCHEMA.ROUTINE_PRIVILEGES
- INFORMATION_SCHEMA.ROUTINE_TABLE_USAGE
- INFORMATION_SCHEMA.SCHEMATA
- INFORMATION_SCHEMA.SQL_FEATURES
- INFORMATION_SCHEMA.SQL_IMPLEMENTATION_INFO
- INFORMATION_SCHEMA.SQL_PACKAGES
- INFORMATION_SCHEMA.SQL_SIZING
- INFORMATION_SCHEMA.SQL_SIZING_PROFILES
- INFORMATION_SCHEMA.SQL_LANGUAGES
- INFORMATION_SCHEMA.TABLES
- INFORMATION_SCHEMA.TABLE_CONSTRAINTS
- INFORMATION_SCHEMA.TABLE_METHOD_RIVILEGES
- INFORMATION_SCHEMA.TABLE_PRIVILEGES
- INFORMATION_SCHEMA.TRANSFORMS
- INFORMATION_SCHEMA.TRANSLATIONS
- INFORMATION_SCHEMA.TRIGGERED_UPDATE_COLUMNS
- INFORMATION_SCHEMA.TRIGGERS
- INFORMATION_SCHEMA.TRIGGER_COLUMN_USAGE
- INFORMATION_SCHEMA.TRIGGER_TABLE_USAGE
- INFORMATION_SCHEMA.TYPE_INFO
- INFORMATION_SCHEMA.USAGE_PRIVILEGES
- INFORMATION_SCHEMA.USER_DEFINED_TYPE_PRIVILEGES
- INFORMATION_SCHEMA.USER_DEFINED_TYPES
- INFORMATION_SCHEMA.VIEWS
- INFORMATION_SCHEMA.VIEW_COLUMN_USAGE
- INFORMATION_SCHEMA.VIEW_TABLE_USAGE
Catalog¶
A Cluster may contain zero or more Catalogs. An SQL Catalog is a named group
of Schemas, one of which must be an Ur-Schema named INFORMATION_SCHEMA.
(The INFORMATION_SCHEMA Schema is a set of Views and Domains that contain
the descriptions of all the SQL-data belonging to that Catalog.) Catalogs are
dependent on some Cluster – the <Catalog name> must be unique within the
Cluster the Catalog belongs to – and are created and dropped using
implementation-defined methods.
Schemas are known as Catalog Objects and, as already stated, a Catalog may consist of one or more Schemas. The Catalog’s name qualifies the names of the Schemas that belong to it, and can either be explicitly stated, or a default name will be supplied by your DBMS.
[NON-PORTABLE] SQL does not include any CREATE CATALOG, OPEN CATALOG or DROP CATALOG statements. The method you’ll use to access a Catalog with your DBMS is thus non-standard because the SQL Standard requires implementors to define how a Catalog comes into being, how it may be accessed and how it may be destroyed.
[OCELOT Implementation] applies for the rest of this section.
The OCELOT DBMS that comes with this book considers a Catalog to be either a directory on your storage device (not necessarily the same device used to store the enclosing Cluster) or a subdirectory within the Cluster directory, e.g., either of these following would represent a Catalog:
C:\CATALOG
C:\CLUSTER\CATALOG
OCELOT’s method of creating and connecting to Catalogs depends on the way you choose to begin a SQL session.
- When you run a Module defined with a
MODULEstatement that includes an explicit <Catalog name> in theSCHEMAclause orAUTHORIZATIONclause, the DBMS will search, on the default Cluster directory, for a subdirectory with a name that matches that <Catalog name>. If the subdirectory can’t be found, the DBMS will search for a directory with the same name. If the directory can’t be found, it will be created and opened. - If the
MODULEstatement doesn’t provide an explicit <Catalog name>, or if you’re not running a Module, the DBMS will open a subdirectory or directory named OCELOT.
Catalog Names:¶
A <Catalog name> identifies a Catalog and is never explicitly qualified with the name of the SQL-server (or Cluster) it belongs to. The required syntax for a <Catalog name> is as follows.
<Catalog name> ::=
string
[NON-PORTABLE] A <Catalog name> is a <regular identifier> or <delimited
identifier> that is unique (for all Catalogs) within the Cluster it belongs to,
but is non-standard because the SQL Standard requires implementors to define
what a <Catalog name> may be. [OCELOT Implementation] The OCELOT DBMS that
comes with this book requires a <Catalog name> to follow the rules for a
directory name or a subdirectory name on the operating system in use; generally
it may include [drive:] and [upper-level name(s)] and name. The <SQL-server
name> which implicitly qualifies an OCELOT <Catalog name> identifies the
Cluster that the Catalog belongs to, and is the same as the <SQL-server name>
argument of the most recent CONNECT TO statement issued for the SQL-session
during which the Catalog was created.
Here is an example of a possible <Catalog name>s.
CATALOG_1
If you want to restrict your code to Core SQL, don’t use explicit <Catalog name>s.
The Information Schema¶
Every Catalog in your SQL-environment contains a Schema called
INFORMATION_SCHEMA; it contains a series of Views, Assertions and Domains
– together, they allow you to look at (but not change) the description of
every Object that belongs to the Catalog, as though it was regular SQL-data.
The SELECT Privilege is granted to PUBLIC WITH GRANT OPTION on every
View in INFORMATION_SCHEMA; the intent is that you will only be able to see
those rows that describe Objects on which you have Privileges. The USAGE
Privilege is also granted to PUBLIC WITH GRANT OPTION on every Domain in
INFORMATION_SCHEMA.
INFORMATION_SCHEMA also contains the definition of every built-in SQL
function, that is, every function that you can use as part of SQL (for example:
ABS, CHAR_LENGTH, CARDINALITY, etc.). The EXECUTE Privilege is
granted to PUBLIC on each one.
Note
The INFORMATION_SCHEMA Views are based on the Tables of an Ur-Schema
called DEFINITION_SCHEMA, but the Standard doesn’t require it to actually
exist – its purpose is merely to provide a data model to support
INFORMATION_SCHEMA. If DEFINITION_SCHEMA did exist though, its Base
tables would describe all the Objects and SQL-data available to an SQL-server
at any time – that is, DEFINITION_SCHEMA would describe an SQL Cluster.
[NON-PORTABLE] The total number of Views in INFORMATION_SCHEMA, and their
exact definition, is non-standard because the SQL Standard allows implementors
to add additional Views, as well as to add additional Columns to the Standard-
defined Views, to describe additional, implementation-defined features.
However, except for one exception, the View descriptions that follow must all
be supported by your SQL DBMS.
In SQL, INFORMATION_SCHEMA is the Schema that contains the Information
Schema Tables, Assertions and Domains. It is considered to have been created by
a CREATE SCHEMA statement that includes an AUTHORIZATION clause showing
an <AuthorizationID> of INFORMATION_SCHEMA. A Standard
INFORMATION_SCHEMA contains one Base table, one Assertion, four Domains and
52 Views. Their descriptions follow.
INFORMATION_SCHEMA Base tables¶
INFORMATION_SCHEMA.INFORMATION_SCHEMA_CATALOG_NAME¶
Definition:
CREATE TABLE INFORMATION_SCHEMA_CATALOG_NAME (
CATALOG_NAME SQL_IDENTIFIER,
CONSTRAINT INFORMATION_SCHEMA_CATALOG_NAME_PRIMARY_KEY
PRIMARY KEY (CATALOG_NAME),
CONSTRAINT INFORMATION_SCHEMA_CATALOG_NAME_CHECK
CHECK ((SELECT COUNT(*) FROM INFORMATION_SCHEMA_CATALOG_NAME)=1))
The INFORMATION_SCHEMA_CATALOG_NAME Base table identifies the Catalog that
contains this Information Schema; the CATALOG_NAME Column contains the name
of the relevant Catalog.
INFORMATION_SCHEMA Assertions¶
INFORMATION_SCHEMA.INFORMATION_SCHEMA_CATALOG_NAME_CARDINALITY¶
Definition:
CREATE ASSERTION INFORMATION_SCHEMA_CATALOG_NAME_CARDINALITY
CHECK (1=(SELECT COUNT(*) FROM INFORMATION_SCHEMA_CATALOG_NAME))
The INFORMATION_SCHEMA_CATALOG_NAME_CARDINALITY Assertion ensures that
there is exactly one row in the INFORMATION_SCHEMA_CATALOG_NAME Table.
INFORMATION_SCHEMA Domains¶
INFORMATION_SCHEMA.CARDINAL_NUMBER¶
Definition:
CREATE DOMAIN CARDINAL_NUMBER AS INTEGER
CONSTRAINT CARDINAL_NUMBER_DOMAIN_CHECK
CHECK (VALUE >= 0)
The set of CARDINAL_NUMBER values includes all non-negative numbers that are
less than your DBMS’s defined maximum for INTEGER values. (Note: This is
probably an error in the Standard: CARDINAL_NUMBER should include all
non-negative numbers that are less than or equal to your DBMS’s defined
maximum for INTEGER values.)
INFORMATION_SCHEMA.CHARACTER_DATA¶
Definition:
CREATE DOMAIN CHARACTER_DATA AS CHARACTER VARYING(ML)
CHARACTER SET SQL_TEXT
The set of CHARACTER_DATA values includes all character strings, from zero
to ML characters long, that belong to the SQL_TEXT Character set. (ML
is replaced by your DBMS’s defined maximum length for a variable-length
character string.)
INFORMATION_SCHEMA.SQL_IDENTIFIER¶
Definition:
CREATE DOMAIN SQL_IDENTIFIER AS CHARACTER VARYING(L)
CHARACTER SET SQL_TEXT
The set of SQL_IDENTIFIER values includes all character strings, from one
to L characters long, that are valid <regular identifier>s and <delimited
identifier> bodies. (L is replaced by your DBMS’s defined maximum length
for a <regular identifier> and <delimited identifier> body.
INFORMATION_SCHEMA.TIME_STAMP¶
Definition:
CREATE DOMAIN TIME_STAMP AS TIMESTAMP(2) DEFAULT CURRENT_TIMESTAMP(2)
The set of TIME_STAMP values includes an SQL timestamp value.
INFORMATION_SCHEMA Views¶
INFORMATION_SCHEMA.ADMINISTRABLE_ROLE_AUTHORIZATIONS¶
This View has the following Columns:
| Name | Domain | Nullable? |
GRANTEE |
SQL_IDENTIFIER |
no |
ROLE_NAME |
SQL_IDENTIFIER |
no |
IS_GRANTABLE |
CHARACTER_DATA |
no |
ADMINISTRABLE_ROLE_AUTHORIZATIONS shows the role authorizations that the
current user may grant to others.
GRANTEEandROLE_NAMEuniquely identify a role authorization which the current user may use.IS_GRANTABLEis ‘YES’ (the role authorization is grantable).
If you want to restrict your code to Core SQL, do not reference
INFORMATION_SCHEMA.ADMINISTRABLE_ROLE_AUTHORIZATIONS.
INFORMATION_SCHEMA.APPLICABLE_ROLES¶
This View has the following Columns:
| Name | Domain | Nullable? |
GRANTEE |
SQL_IDENTIFIER |
no |
ROLE_NAME |
SQL_IDENTIFIER |
no |
IS_GRANTABLE |
CHARACTER_DATA |
no |
APPLICABLE_ROLES shows the role authorizations that the current user may
use.
GRANTEEandROLE_NAMEuniquely identify a role authorization that the current user may use.IS_GRANTABLEis either ‘YES’ (the role authorization is grantable) or ‘NO’ (the role authorization is not grantable).
If you want to restrict your code to Core SQL, do not reference
INFORMATION_SCHEMA.APPLICABLE_ROLES.
INFORMATION_SCHEMA.ASSERTIONS¶
This View has the following Columns:
| Name | Domain | Nullable? |
CONSTRAINT_CATALOG |
SQL_IDENTIFIER |
no |
CONSTRAINT_SCHEMA |
SQL_IDENTIFIER |
no |
CONSTRAINT_NAME |
SQL_IDENTIFIER |
no |
IS_DEFERRABLE |
CHARACTER_DATA |
no |
INITIALLY_DEFERRED |
CHARACTER_DATA |
no |
ASSERTIONS shows the Assertions in this Catalog that are owned by the
current user.
CONSTRAINT_CATALOG,CONSTRAINT_SCHEMA,CONSTRAINT_NAMEuniquely identify an Assertion owned by the current user.IS_DEFERRABLEis either ‘YES’ (the Assertion isINITIALLY DEFERRED) or ‘NO’ (the Assertion isNOT DEFERRABLE).INITIALLY_DEFERREDis either ‘YES’ (the Assertion isINITIALLY DEFERRED) or ‘NO’ (the Assertion isINITIALLY IMMEDIATE).
If you want to restrict your code to Core SQL, do not reference
INFORMATION_SCHEMA.ASSERTIONS.
INFORMATION_SCHEMA.ATTRIBUTES¶
This View has the following Columns:
| Name | Domain | Nullable? |
UDT_CATALOG |
SQL_IDENTIFIER |
no |
UDT_NAME |
SQL_IDENTIFIER |
no |
ATTRIBUTE_NAME |
SQL_IDENTIFIER |
no |
ORDINAL_POSITION |
CARDINAL_NUMBER |
no |
COLUMN_DEFAULT |
CHARACTER_DATA |
yes |
IS_NULLABLE |
CHARACTER_DATA |
no |
DATA_TYPE |
CHARACTER_DATA |
no |
CHARACTER_MAXIMUM_LENGTH |
CARDINAL_NUMBER |
yes |
CHARACTER_OCTET_LENGTH |
CARDINAL_NUMBER |
yes |
NUMERIC_PRECISION |
CARDINAL_NUMBER |
yes |
NUMERIC_PRECISION_RADIX |
CARDINAL_NUMBER |
yes |
NUMERIC_SCALE |
CARDINAL_NUMBER |
yes |
DATETIME_PRECISION |
CARDINAL_NUMBER |
yes |
INTERVAL_TYPE |
CHARACTER_DATA |
yes |
INTERVAL_PRECISION |
CARDINAL_NUMBER |
yes |
CHARACTER_SET_CATALOG |
SQL_IDENTIFIER |
yes |
CHARACTER_SET_SCHEMA |
SQL_IDENTIFIER |
yes |
CHARACTER_SET_NAME |
SQL_IDENTIFIER |
yes |
COLLATION_CATALOG |
SQL_IDENTIFIER |
yes |
COLLATION_SCHEMA |
SQL_IDENTIFIER |
yes |
COLLATION_NAME |
SQL_IDENTIFIER |
yes |
DOMAIN_CATALOG |
SQL_IDENTIFIER |
yes |
DOMAIN_SCHEMA |
SQL_IDENTIFIER |
yes |
DOMAIN_NAME |
SQL_IDENTIFIER |
yes |
USER_DEFINED_TYPE_CATALOG |
CHARACTER_DATA |
yes |
USER_DEFINED_TYPE_SCHEMA |
CHARACTER_DATA |
yes |
USER_DEFINED_TYPE_NAME |
CHARACTER_DATA |
yes |
CHECK_REFERENCES |
CHARACTER_DATA |
yes |
CHECK_ACTION |
CHARACTER_DATA |
yes |
ATTRIBUTES shows the Attributes of UDTs in this Catalog on wich the current
user has Privileges.
UDT_CATALOG,UDT_SCHEMA,UDT_NAME,ATTRIBUTE_NAMEuniquely identify an Attribute on wich the current user has Privileges.ORDINAL_POSITIONis the position of Attribute in its UDT. The first Attribute has ordinal position 1, the second Attribute has ordinal position 2, etc. Warning: the position can change ifALTER TYPEis used to drop an Attribute.COLUMN_DEFAULTshows the Attribute´s default value (presumably the DBMS willCASTthe value if it must). IT will beNULLif the Attribute was defined without aDEFAULTclause (and presumably if it was defined withDEFAULT NULL).COLUMN_DEFAULTwill be ‘TRUNCATED’ if the default value was too long to be stored.IS_NULLABLEis either ‘YES’ (the Attribute is possibly nullable) or ‘NO’ (the Attribute is known not nullable).DATA_TYPEshows the Attribute´s <data type>: either ‘BINARY LARGE OBJECT’, ‘BIT’, ‘BIT VARYING’, ‘CHARACTER’, ‘CHARACTER VARYING’, ‘CHARACTER LARGE OBJECT’, ‘INTEGER’, ‘SMALLINT’, ‘NUMERIC’, ‘DECIMAL’, ‘REAL’, ‘DOUBLE PRECISION’, ‘FLOAT’, ‘DATE’, ‘TIME’, ‘TIME WITH TIME ZONE’, ‘TIMESTAMP’, ‘TIMESTAMP WITH TIME ZONE’, ‘INTERVAL’, ‘BOOLEAN’, ‘USER-DEFINED TYPE’ – or something else, such as an implementation-defined data type.CHARACTER_MAXIMUM_LENGTHshows the Attribute´s maximum lwngth in CHARACTER_SET_NAME(for ‘CHARACTER’, ‘CHARACTER VARYING’, ‘CHARACTER LARGE OBJECT’) or in bits (for ‘BIT’, ‘BIT VARYING’, ‘BINARY LARGE OBJECT’). For other <data type>sCHARACTER_MAXIMUM_LENGTHisNULL.CHARACTER_OCTET_LENGTHshows the Column’s maximum length in octets (for ‘CHARACTER’, ‘CHARACTER VARYING’, ‘CHARACTER LARGE OBJECT’, ‘BIT’, ‘BIT VARYING’, ‘BINARY LARGE OBJECT’). For other <data type>s,CHARACTER_OCTET_LENGTHisNULL.NUMERIC_PRECISIONshows the Column’s precision (for ‘INTEGER’, ‘SMALLINT’, ‘NUMERIC’, ‘DECIMAL’, ‘REAL’, ‘FLOAT’, ‘DOUBLE PRECISION’, ‘DATE’, ‘TIME’, ‘TIMESTAMP’, ‘TIME WITH TIME ZONE’, ‘TIMESTAMP WITH TIME ZONE’, ‘INTERVAL’). For other <data type>s,NUMERIC_PRECISIONisNULL.NUMERIC_PRECISION_RADIXis either 2 or 10, depending on your DBMS (for ‘INTEGER’, ‘SMALLINT’, ‘DATE’, ‘TIME’, ‘TIMESTAMP’, ‘TIME WITH TIME ZONE’, ‘TIMESTAMP WITH TIME ZONE’, ‘INTERVAL’), 10 (for ‘NUMERIC’, ‘DECIMAL’), 2 (for ‘REAL’, ‘FLOAT’, ‘DOUBLE PRECISION’. For other <data type>s,NUMERIC_PRECISION_RADIXisNULL.NUMERIC_SCALEis either 0 (for ‘INTEGER’, ‘SMALLINT’) or shows the Column’s scale (for ‘NUMERIC’, ‘DECIMAL’). For other <data type>s,NUMERIC_SCALEisNULL.DATETIME_PRECISIONshows the Column’s fractional-seconds precision (for ‘TIME’, ‘TIMESTAMP’, ‘TIME WITH TIME ZONE’, ‘TIMESTAMP WITH TIME ZONE’, ‘INTERVAL’). For other <data type>s,DATETIME_PRECISIONisNULL.INTERVAL_TYPEshows the Column’s interval type (for ‘INTERVAL’): either ‘YEAR’, ‘MONTH’, ‘DAY’, ‘HOUR’, ‘MINUTE’, ‘SECOND’, ‘YEAR TO MONTH’, ‘DAY TO HOUR’, ‘DAY TO MINUTE’, ‘DAY TO SECOND’, ‘HOUR TO MINUTE’, ‘HOUR TO SECOND’, ‘MINUTE TO SECOND’. For other <data type>s,INTERVAL_TYPEisNULL.INTERVAL_PRECISIONshows the Attribute´s precision for the interval leading field (for ‘INTERVAL’). For other <data type>s,INTERVAL_PRECISIONisNULL.CHARACTER_SET_CATALOG,CHARACTER_SET_SCHEMA,CHARACTER_SET_NAMEuniquely identify a Character set the Attribute values belong to (for ‘CHARACTER’, ‘CHARACTER VARYING’, ‘CHARACTER LARGE OBJECT’). For other <data type>s these fields areNULL.COLLATION_CATALOG,COLLATION_SCHEMA,COLLATION_NAMEuniquely identify the Attribute´s default Collation (for ‘CHARACTER’, ‘CHARACTER VARYING’, ‘CHARACTER LARGE OBJECT’). For other <data type>s, these fields areNULL.DOMAIN_CATALOG,DOMAIN_SCHEMA,DOMAIN_NAMEuniquely identify the Domain that the Attribute depends on. If no Domain was used in the Attribute definition, these fields areNULL.USER_DEFINED_TYPE_CATALOG,USER_DEFINED_TYPE_SCHEMA,USER_DEFINED_TYPE_NAMEuniquely identify the UDT which is the Attribute´s data type (if any); otherwise, these fields areNULL.CHECK_REFERENCESisNULLif the Attribute´s <data type> is not a reference type. Otherwise,CHECK_REFERENCESis ‘YES’ (reference values are checked) or ‘NO’ (reference values are not checked.)CHECK_ACTIONisNULLif the Attribute´s <data type> is not a reference type. Otherwise,CHECK_ACTIONis ‘NO ACTION’ (<refernece scope check action> isNO ACTION).
If you want to restrict your code to Core SQL, do not reference
INFORMATION_SCHEMA.ATTRIBUTES.
INFORMATION_SCHEMA.CHARACTER_SETS¶
This View has the following Columns:
| Name | Domain | Nullable? |
CHARACTER_SET_CATALOG |
SQL_IDENTIFIER |
no |
CHARACTER_SET_SCHEMA |
SQL_IDENTIFIER |
no |
CHARACTER_SET_NAME |
SQL_IDENTIFIER |
no |
FORM_OF_USE |
SQL_IDENTIFIER |
no |
NUMBER_OF_CHARACTERS |
CARDINAL_NUMBER |
no |
DEFAULT_COLLATE_CATALOG |
SQL_IDENTIFIER |
no |
DEFAULT_COLLATE_SCHEMA |
SQL_IDENTIFIER |
no |
DEFAULT_COLLATE_NAME |
SQL_IDENTIFIER |
no |
CHARACTER_SETS shows the Character sets in this Catalog on which the
current user has Privileges.
CHARACTER_SET_CATALOG,CHARACTER_SET_SCHEMA,CHARACTER_SET_NAME, uniquely identify a Character set that the current user may use.FORM_OF_USEis a zero-length string. (Note: This may be an error in the Standart.FORM_OF_USEshould probably name the Form-of-use for the Character set.)NUMBER_OF_CHARACTERSis a tero-length string. (Note: This is an error in the Standart.NUMBER_OF_CHARACTERSmust be a number and therefore should probably show the number of characters in the Character set.)DEFAULT_COLLATE_CATALOG,DEFAULT_COLLATE_SCHEMA,DEFAULT_COLLATE_NAMEuniquely identify the Character set´s default Collation.
INFORMATION_SCHEMA.CHECK_CONSTRAINTS¶
This View has the following Columns:
| Name | Domain | Nullable? |
CONSTRAINT_CATALOG |
SQL_IDENTIFIER |
no |
CONSTRAINT_SCHEMA |
SQL_IDENTIFIER |
no |
CONSTRAINT_NAME |
SQL_IDENTIFIER |
no |
CHECK_CLAUSE |
CHARACTER_DATA |
yes |
CHECK_CONSTRAINTS shows the CHECK Constraints in this Catalog that are
owned by the current user. (THis category includes the user´s Domain
Constraints, Assertions and some TABLEConstraints.)
CONSTRAINT_CATALOG,CONSTRAINT_SCHEMA,CONSTRAINT_NAMEuniquely identify aCHECKConstraint owned by the current user.CHECK_CLAUSEshows the Constraint´sCHECKclause in full. It will beNULLif theCHECKclause was too long to be stored.
INFORMATION_SCHEMA.COLLATIONS¶
This View has the following Columns:
| Name | Domain | Nullable? |
COLLATION_CATALOG |
SQL_IDENTIFIER |
no |
COLLATION_SCHEMA |
SQL_IDENTIFIER |
no |
COLLATION_NAME |
SQL_IDENTIFIER |
no |
CHARACTER_SET_CATALOG |
SQL_IDENTIFIER |
no |
CHARACTER_SET_SCHEMA |
SQL_IDENTIFIER |
no |
CHARACTER_SET_NAME |
SQL_IDENTIFIER |
no |
PAD_ATTRIBUTE |
CHARACTER_DATA |
no |
COLLATION_TYPE |
CHARACTER_DATA |
no |
COLLATION_DEFINITION |
CHARACTER_DATA |
no |
COLLATION_DICTIONARY |
CHARACTER_DATA |
no |
COLLATIONS shows the Collations in this Catalog on which the current user
has Privileges.
COLLATION_CATALOG,COLLATION_SCHEMA,CHARACTER_NAMEuniquely identify Collation that the current user may use.CHARACTER_SET_CATALOG,CHARACTER_SET_SCHEMA,CHARACTER_SET_NAMEuniquely identify the Character set of the Collation.PAD_ATTRIBUTEis either ‘NO PAD’ (the Collation has theNO PADattribute) or ‘SPACE’ (the Collation has thePAD SPACEattribute).COLLATION_TYPE,COLLATION_DEFINITION, andCOLLATION_DICTIONARYare zero-length strings. To date, the Standart makes no use of these fields.
If you want to restrict your code to Core SQL, do not reference
INFORMATION_SCHEMA.COLLATIONS.
INFORMATION_SCHEMA.COLUMNS¶
This View has the following Columns:
| Name | Domain | Nullable? |
TABLE_CATALOG |
SQL_IDENTIFIER |
yes |
TABLE_SCHEMA |
SQL_IDENTIFIER |
yes |
TABLE_NAME |
SQL_IDENTIFIER |
yes |
COLUMN_NAME |
SQL_IDENTIFIER |
yes |
ORDINAL_POSITION |
CARDINAL_NUMBER |
yes |
COLUMN_DEFAULT |
CHARACTER_DATA |
yes |
IS_NULLABLE |
CHARACTER_DATA |
yes |
DATA_TYPE |
CHARACTER_DATA |
yes |
CHARACTER_MAXIMUM_LENGTH |
CARDINAL_NUMBER |
yes |
CHARACTER_OCTET_LENGTH |
CARDINAL_NUMBER |
yes |
NUMERIC_PRECISION |
CARDINAL_NUMBER |
yes |
NUMERIC_PRECISION_RADIX |
CARDINAL_NUMBER |
yes |
NUMERIC_SCALE |
CARDINAL_NUMBER |
yes |
DATETIME_PRECISION |
CARDINAL_NUMBER |
yes |
INTERVAL_TYPE |
CHARACTER_DATA |
yes |
INTERVAL_PRECISION |
CARDINAL_NUMBER |
yes |
CHARACTER_SET_CATALOG |
SQL_IDENTIFIER |
yes |
CHARACTER_SET_SCHEMA |
SQL_IDENTIFIER |
yes |
CHARACTER_SET_NAME |
SQL_IDENTIFIER |
yes |
COLLATION_CATALOG |
SQL_IDENTIFIER |
yes |
COLLATION_SCHEMA |
SQL_IDENTIFIER |
yes |
COLLATION_NAME |
SQL_IDENTIFIER |
yes |
DOMAIN_CATALOG |
SQL_IDENTIFIER |
yes |
DOMAIN_SCHEMA |
SQL_IDENTIFIER |
yes |
DOMAIN_NAME |
SQL_IDENTIFIER |
yes |
USER_DEFINED_TYPE_CATALOG |
SQL_IDENTIFIER |
yes |
USER_DEFINED_TYPE_SCHEMA |
SQL_IDENTIFIER |
yes |
USER_DEFINED_TYPE_NAME |
SQL_IDENTIFIER |
yes |
SCOPE_CATALOG |
SQL_IDENTIFIER |
yes |
SCOPE_SCHEMA |
SQL_IDENTIFIER |
yes |
SCOPE_NAME |
SQL_IDENTIFIER |
yes |
IS_SELF_REFERENCING |
CHARACTER_DATA |
yes |
CHECK_REFERENCES |
CHARACTER_DATA |
yes |
CHECK_ACTION |
CHARACTER_DATA |
yes |
COLUMNS shows the Columns in this Catalog that the current user has
Privileges on.
TABLE_CATALOG,TABLE_SCHEMA,TABLE_NAME,COLUMN_NAMEuniquely- identify a Column that the current user may use.
ORDINAL_POSITIONshows the position of the Column in its Table: the first Column has ordinal position 1, the second Column has ordinal position 2, etc. Warning: the position can change ifALTER TABLEis used to add or drop a Column.COLUMN_DEFAULTshows the Column’s default value (presumably the DBMS willCASTthe value to a character string if it must). It will beNULLif the Column was defined without aDEFAULTclause (and presumably if it was defined withDEFAULT NULL) or if the Column’s default value comes only from a Domain.COLUMN_DEFAULTwill be ‘TRUNCATED’ if the default value was too long to be stored.IS_NULLABLEis either ‘YES’ (the Column is possibly nullable) or ‘NO’ (the Column is known not nullable).DATA_TYPEshows the Column’s <data type>: either ‘BINARY LARGE OBJECT’, ‘BIT’, ‘BIT VARYING’, ‘CHARACTER’, ‘CHARACTER VARYING’, ‘CHARACTER LARGE OBJECT’, ‘INTEGER’, ‘SMALLINT’, ‘NUMERIC’, ‘DECIMAL’, ‘REAL’, ‘DOUBLE PRECISION’, ‘FLOAT’, ‘DATE’, ‘TIME’, ‘TIME WITH TIME ZONE’, ‘TIMESTAMP’, ‘TIMESTAMP WITH TIME ZONE’, ‘INTERVAL’, ‘BOOLEAN’, ‘USER-DEFINED TYPE’ – or something else, such as an implementation-defined data type.CHARACTER_MAXIMUM_LENGTHshows the Column’s maximum length in characters (for ‘CHARACTER’, ‘CHARACTER VARYING’, ‘CHARACTER LARGE OBJECT’) or in bits (for ‘BIT’, ‘BIT VARYING’, ‘BINARY LARGE OBJECT’). For other <data type>s,CHARACTER_MAXIMUM_LENGTHisNULL.CHARACTER_OCTET_LENGTHshows the Column’s maximum length in octets (for ‘CHARACTER’, ‘CHARACTER VARYING’, ‘CHARACTER LARGE OBJECT’, ‘BIT’, ‘BIT VARYING’, ‘BINARY LARGE OBJECT’). For other <data type>s,CHARACTER_OCTET_LENGTHisNULL.NUMERIC_PRECISIONshows the Column’s precision (for ‘INTEGER’, ‘SMALLINT’, ‘NUMERIC’, ‘DECIMAL’, ‘REAL’, ‘FLOAT’, ‘DOUBLE PRECISION’, ‘DATE’, ‘TIME’, ‘TIMESTAMP’, ‘TIME WITH TIME ZONE’, ‘TIMESTAMP WITH TIME ZONE’, ‘INTERVAL’). For other <data type>s,NUMERIC_PRECISIONisNULL.NUMERIC_PRECISION_RADIXis either 2 or 10, depending on your DBMS (for ‘INTEGER’, ‘SMALLINT’, ‘DATE’, ‘TIME’, ‘TIMESTAMP’, ‘TIME WITH TIME ZONE’, ‘TIMESTAMP WITH TIME ZONE’, ‘INTERVAL’), 10 (for ‘NUMERIC’, ‘DECIMAL’), 2 (for ‘REAL’, ‘FLOAT’, ‘DOUBLE PRECISION’. For other <data type>s,NUMERIC_PRECISION_RADIXisNULL.NUMERIC_SCALEis either 0 (for ‘INTEGER’, ‘SMALLINT’) or shows the Column’s scale (for ‘NUMERIC’, ‘DECIMAL’). For other <data type>s,NUMERIC_SCALEisNULL.DATETIME_PRECISIONshows the Column’s fractional-seconds precision (for ‘TIME’, ‘TIMESTAMP’, ‘TIME WITH TIME ZONE’, ‘TIMESTAMP WITH TIME ZONE’, ‘INTERVAL’). For other <data type>s,DATETIME_PRECISIONisNULL.INTERVAL_TYPEshows the Column’s interval type (for ‘INTERVAL’): either ‘YEAR’, ‘MONTH’, ‘DAY’, ‘HOUR’, ‘MINUTE’, ‘SECOND’, ‘YEAR TO MONTH’, ‘DAY TO HOUR’, ‘DAY TO MINUTE’, ‘DAY TO SECOND’, ‘HOUR TO MINUTE’, ‘HOUR TO SECOND’, ‘MINUTE TO SECOND’. For other <data type>s,INTERVAL_TYPEisNULL.INTERVAL_PRECISIONshows the Column’s precision for the interval leading field (for ‘INTERVAL’). For other <data type>s,INTERVAL_PRECISIONisNULL.CHARACTER_SET_CATALOG,CHARACTER_SET_SCHEMA,CHARACTER_SET_NAMEuniquely identify the Character set the Column values belong to (for ‘CHARACTER’, ‘CHARACTER VARYING’, ‘CHARACTER LARGE OBJECT’). For other <data type>s, these fields areNULL.COLLATION_CATALOG,COLLATION_SCHEMA,COLLATION_NAMEuniquely identify the Column’s default Collation (for ‘CHARACTER’, ‘CHARACTER VARYING’, ‘CHARACTER LARGE OBJECT’). For other <data type>s, these fields areNULL.DOMAIN_CATALOG,DOMAIN_SCHEMA,DOMAIN_NAMEuniquely identify the Domain that the Column depends on. If no Domain was used in the Column definition, these fields areNULL.USER_DEFINED_TYPE_CATALOG,USER_DEFINED_TYPE_SCHEMA,USER_DEFINED_TYPE_NAMEuniquely identify the UDT that the Column depends on. If the Column doesn’t use a UDT, these fields areNULL.CHECK_REFERENCESisNULLif the Column is part of a View or if its <data type> is not a reference type. Otherwise,CHECK_REFERENCESis ‘YES’ (reference values are checked) or ‘NO’ (reference values are not checked).CHECK_ACTIONisNULLif the Column is part of a View or if its <data type> is not a reference type. Otherwise,CHECK_ACTIONis ‘RESTRICT'(<reference scope check action> isRESTRICT) or ‘SET NULL'(<reference scope check action> isSET NULL).
INFORMATION_SCHEMA.COLUMN_DOMAIN_USAGE¶
This View has the following Columns:
| Name | Domain | Nullable? |
DOMAIN_CATALOG |
SQL_IDENTIFIER |
no |
DOMAIN_SCHEMA |
SQL_IDENTIFIER |
no |
DOMAIN_NAME |
SQL_IDENTIFIER |
no |
TABLE_CATALOG |
SQL_IDENTIFIER |
no |
TABLE_SCHEMA |
SQL_IDENTIFIER |
no |
TABLE_NAME |
SQL_IDENTIFIER |
no |
COLUMN_NAME |
SQL_IDENTIFIER |
no |
COLUMN_DOMAIN_USAGE shows the Columns that depend on Domains in this
Catalog, where the Domains are owned by the current user.
DOMAIN_CATALOG,DOMAIN_SCHEMA,DOMAIN_NAMEuniquely identify a Domain owned by the current user.TABLE_CATALOG,TABLE_SCHEMA,TABLE_NAME,COLUMN_NAMEuniquely identify a Column that depends on the Domain.
If you want to restrict your code to Core SQL, do not reference
INFORMATION_SCHEMA.COLUMN_DOMAIN_USAGE.
INFORMATION_SCHEMA.COLUMN_PRIVILEGES¶
This View has the following Columns:
| Name | Domain | Nullable? |
GRANTOR |
SQL_IDENTIFIER |
no |
GRANTEE |
SQL_IDENTIFIER |
no |
TABLE_CATALOG |
SQL_IDENTIFIER |
no |
TABLE_SCHEMA |
SQL_IDENTIFIER |
no |
TABLE_NAME |
SQL_IDENTIFIER |
no |
COLUMN_NAME |
SQL_IDENTIFIER |
no |
PRIVILEGE_TYPE |
CHARACTER_DATA |
no |
IS_GRANTABLE |
CHARACTER_DATA |
no |
COLUMN_PRIVILEGES shows the Privileges on Columns belonging to Tables in
this Catalog, where the Privileges are either available to, or granted by, the
current user.
GRANTORshows the <AuthorizationID> of the user (or perhaps the Role) who granted the Privilege.GRANTEEshows the <AuthorizationID> of the user (or perhaps the Role) who may use the Privilege. By definition, ifGRANTORisn’tCURRENT_USER, thenGRANTEEis eitherCURRENT_USERor ‘PUBLIC’.TABLE_CATALOG,TABLE_SCHEMA,TABLE_NAME,COLUMN_NAMEuniquely identify a Column belonging to a Table in this Catalog.PRIVILEGE_TYPEshows the Privilege granted: either ‘INSERT’, ‘UPDATE’, ‘REFERENCES’, ‘SELECT’.IS_GRANTABLEis either ‘YES’ (Privilege was grantedWITH GRANT OPTION) or ‘NO’ (Privilege was not grantedWITH GRANT OPTION).
If you want to restrict your code to Core SQL, do not reference
INFORMATION_SCHEMA.COLUMN_PRIVILEGES.
INFORMATION_SCHEMA.COLUMN_USER_DEFINED_TYPE_USAGE¶
This View has the following Columns:
| Name | Domain | Nullable? |
USER_DEFINED_TYPE_CATALOG |
SQL_IDENTIFIER |
no |
USER_DEFINED_TYPE_SCHEMA |
SQL_IDENTIFIER |
no |
USER_DEFINED_TYPE_NAME |
SQL_IDENTIFIER |
no |
TABLE_CATALOG |
SQL_IDENTIFIER |
no |
TABLE_SCHEMA |
SQL_IDENTIFIER |
no |
TABLE_NAME |
SQL_IDENTIFIER |
no |
COLUMN_NAME |
SQL_IDENTIFIER |
no |
COLUMN_USER_DEFINED_TYPE_USAGE shows the Columns that depend on a UDT in
this Catalog, where the UDT is owned by the current user.
USER_DEFINED_TYPE_CATALOG,USER_DEFINED_TYPE_SCHEMA,USER_DEFINED_TYPE_NAMEuniquely identify a UDT that belongs to the current user.TABLE_CATALOG,TABLE_SCHEMA,TABLE_NAME,COLUMN_NAMEuniquely identify a Column that depends on the UDT.
If you want to restrict your code to Core SQL, do not reference
INFORMATION_SCHEMA.COLUMN_USER_DEFINED_TYPE_USAGE.
INFORMATION_SCHEMA.CONSTRAINT_COLUMN_USAGE¶
This View has the following Columns:
| Name | Domain | Nullable? |
TABLE_CATALOG |
SQL_IDENTIFIER |
no |
TABLE_SCHEMA |
SQL_IDENTIFIER |
no |
TABLE_NAME |
SQL_IDENTIFIER |
no |
COLUMN_NAME |
SQL_IDENTIFIER |
no |
CONSTRAINT_CATALOG |
SQL_IDENTIFIER |
no |
CONSTRAINT_SCHEMA |
SQL_IDENTIFIER |
no |
CONSTRAINT_NAME |
SQL_IDENTIFIER |
no |
CONSTRAINT_COLUMN_USAGE shows the Columns used by any Constraint or
Assertion in this Catalog, where the Constraint or Assertion is owned by the
current user.
TABLE_CATALOG,TABLE_SCHEMA,TABLE_NAME,COLUMN_NAMEuniquely identify a Column that appears in a Constraint/Assertion.CONSTRAINT_CATALOG,CONSTRAINT_SCHEMA,CONSTRAINT_NAMEuniquely identify the Constraint/Assertion that uses the Column. The Constraint/Assertion is owned by the current user.
If you want to restrict your code to Core SQL, do not reference
INFORMATION_SCHEMA.CONSTRAINT_COLUMN_USAGE.
INFORMATION_SCHEMA.CONSTRAINT_TABLE_USAGE¶
This View has the following Columns:
| Name | Domain | Nullable? |
TABLE_CATALOG |
SQL_IDENTIFIER |
no |
TABLE_SCHEMA |
SQL_IDENTIFIER |
no |
TABLE_NAME |
SQL_IDENTIFIER |
no |
CONSTRAINT_CATALOG |
SQL_IDENTIFIER |
no |
CONSTRAINT_SCHEMA |
SQL_IDENTIFIER |
no |
CONSTRAINT_NAME |
SQL_IDENTIFIER |
no |
CONSTRAINT_TABLE_USAGE shows the Tables used by any Constraint or Assertion
in this Catalog, where the Constraint or Assertion is owned by the current
user.
TABLE_CATALOG,TABLE_SCHEMA,TABLE_NAMEuniquely identify a Table that appears in a Constraint/Assertion.CONSTRAINT_CATALOG,CONSTRAINT_SCHEMA,CONSTRAINT_NAMEuniquely identify the Constraint/Assertion that uses the Table. The Constraint/Assertion is owned by the current user.
If you want to restrict your code to Core SQL, do not reference
INFORMATION_SCHEMA.CONSTRAINT_TABLE_USAGE.
INFORMATION_SCHEMA.DIRECT_SUPERTABLES¶
This View has the following Columns:
| Name | Domain | Nullable? |
TABLE_CATALOG |
SQL_IDENTIFIER |
no |
TABLE_SCHEMA |
SQL_IDENTIFIER |
no |
TABLE_NAME |
SQL_IDENTIFIER |
no |
SUPERTABLE_NAME |
SQL_IDENTIFIER |
no |
DIRECT_SUPERTABLES shows the direct subtables in this Catalog that are
related to a supertable, where the subtables are owned by the current user.
TABLE_CATALOG,TABLE_SCHEMA,TABLE_NAMEuniquely identify a Table owned by the current user.SUPERTABLE_NAMEidentifies the related supertable for the Table.
If you want to restrict your code to Core SQL, do not reference
INFORMATION_SCHEMA.DIRECT_SUPERTABLES.
INFORMATION_SCHEMA.DIRECT_SUPERTYPES¶
This view has the following Column:
| Name | Domain | Nullable? |
USER_DEFINED_TYPE_CATALOG |
SQL_IDENTIFIER |
no |
USER_DEFINED_TYPE_SCHEMA |
SQL_IDENTIFIER |
no |
USER_DEFINED_TYPE_NAME |
SQL_IDENTIFIER |
no |
SUPERTYPE_CATALOG |
SQL_IDENTIFIER |
no |
SUPERTYPE_SCHEMA |
SQL_IDENTIFIER |
no |
SUPERTYPE_NAME |
SQL_IDENTIFIER |
no |
DIRECT_SUPERTYPES shows the direct subtypes in this Catalog that are
related to a supertype where subtypes are owned by the current user.
USER_DEFINED_TYPE_CATALOG,USER_DEFINED_TYPE_SCHEMA,USER_DEFINED_TYPE_NAMEuniquely identify a UDT owned by the current user.SUPERTYPE_CATALOG,SUPERTYPE_SCHEMA,SUPERTYPE_NAMEuniquely identify the related supertype for the UDT.
If you want to restrict your code to Core SQL, do not reference
INFORMATION_SCHEMA.DIRECT_SUPERTYPES.
INFORMATION_SCHEMA.DOMAINS¶
This View has the following Columns:
| Name | Domain | Nullable? |
DOMAIN_CATALOG |
SQL_IDENTIFIER |
no |
DOMAIN_SCHEMA |
SQL_IDENTIFIER |
no |
DOMAIN_NAME |
SQL_IDENTIFIER |
no |
DATA_TYPE |
CHARACTER_DATA |
no |
CHARACTER_MAXIMUM_LENGTH |
CARDINAL_NUMBER |
yes |
CHARACTER_OCTET_LENGTH |
CARDINAL_NUMBER |
yes |
COLLATION_CATALOG |
SQL_IDENTIFIER |
yes |
COLLATION_SCHEMA |
SQL_IDENTIFIER |
yes |
COLLATION_NAME |
SQL_IDENTIFIER |
yes |
CHARACTER_SET_CATALOG |
SQL_IDENTIFIER |
yes |
CHARACTER_SET_SCHEMA |
SQL_IDENTIFIER |
yes |
CHARACTER_SET_NAME |
SQL_IDENTIFIER |
yes |
NUMERIC_PRECISION |
CARDINAL_NUMBER |
yes |
NUMERIC_PRECISION_RADIX |
CARDINAL_NUMBER |
yes |
NUMERIC_SCALE |
CARDINAL_NUMBER |
yes |
DATETIME_PRECISION |
CARDINAL_NUMBER |
yes |
INTERVAL_TYPE |
CHARACTER_DATA |
yes |
INTERVAL_PRECISION |
CARDINAL_NUMBER |
yes |
DOMAIN_DEFAULT |
CHARACTER_DATA |
yes |
USER_DEFINED_TYPE_CATALOG |
SQL_IDENTIFIER |
yes |
USER_DEFINED_TYPE_SCHEMA |
SQL_IDENTIFIER |
yes |
USER_DEFINED_TYPE_NAME |
SQL_IDENTIFIER |
yes |
DOMAINS shows the Domains in this Catalog that the current user has
Privileges on.
DOMAIN_CATALOG,DOMAIN_SCHEMA,DOMAIN_NAMEuniquely identify a Domain that the current user may use, either because of a USAGE Privilege directly on the Domain or because of a Privilege on any Column that depends on the Domain.DATA_TYPEshows the Domain’s <data type>: either ‘BINARY LARGE OBJECT’, ‘BIT’, ‘BIT VARYING’, ‘CHARACTER’, ‘CHARACTER VARYING’, ‘CHARACTER LARGE OBJECT’, ‘INTEGER’, ‘SMALLINT’, ‘NUMERIC’, ‘DECIMAL’, ‘REAL’, ‘DOUBLE PRECISION’, ‘FLOAT’, ‘DATE’, ‘TIME’, ‘TIME WITH TIME ZONE’, ‘TIMESTAMP’, ‘TIMESTAMP WITH TIME ZONE’, ‘INTERVAL’, ‘BOOLEAN’, ‘USER-DEFINED TYPE’ – or something else, such as an implementation-defined data type.CHARACTER_MAXIMUM_LENGTHshows the Domain’s maximum length in characters (for ‘CHARACTER’, ‘CHARACTER VARYING’, ‘CHARACTER LARGE OBJECT’) or in bits (for ‘BIT’, ‘BIT VARYING’, ‘BINARY LARGE OBJECT’). For other <data type>s,CHARACTER_MAXIMUM_LENGTHisNULL.CHARACTER_OCTET_LENGTHshows the Domain’s maximum length in octets (for ‘CHARACTER’, ‘CHARACTER VARYING’, ‘CHARACTER LARGE OBJECT’, ‘BIT’, ‘BIT VARYING’, ‘BINARY LARGE OBJECT’). For other <data type>s,CHARACTER_OCTET_LENGTHisNULL.COLLATION_CATALOG,COLLATION_SCHEMA,COLLATION_NAMEuniquely identify the Domain’s default Collation (for ‘CHARACTER’, ‘CHARACTER VARYING’, ‘CHARACTER LARGE OBJECT’). For other <data type>s, these fields areNULL.CHARACTER_SET_CATALOG,CHARACTER_SET_SCHEMA,CHARACTER_SET_NAMEuniquely identify the Character set the Domain values belong to (for ‘CHARACTER’, ‘CHARACTER VARYING’, ‘CHARACTER LARGE OBJECT’). For other <data type>s, these fields areNULL.NUMERIC_PRECISIONshows the Domain’s precision (for ‘INTEGER’, ‘SMALLINT’, ‘NUMERIC’, ‘DECIMAL’, ‘REAL’, ‘FLOAT’, ‘DOUBLE PRECISION’, ‘DATE’, ‘TIME’, ‘TIMESTAMP’, ‘TIME WITH TIME ZONE’, ‘TIMESTAMP WITH TIME ZONE’, ‘INTERVAL’). For other <data type>s,NUMERIC_PRECISIONisNULL.NUMERIC_PRECISION_RADIXis either 2 or 10, depending on your DBMS (for ‘INTEGER’, ‘SMALLINT’, ‘DATE’, ‘TIME’, ‘TIMESTAMP’, ‘TIME WITH TIME ZONE’, ‘TIMESTAMP WITH TIME ZONE’, ‘INTERVAL’), 10 (for ‘NUMERIC’, ‘DECIMAL’), 2 (for ‘REAL’, ‘FLOAT’, ‘DOUBLE PRECISION’. For other <data type>s,NUMERIC_PRECISION_RADIXisNULL.NUMERIC_SCALEis either 0 (for ‘INTEGER’, ‘SMALLINT’) or shows the Domain’s scale (for ‘NUMERIC’, ‘DECIMAL’). For other <data type>s,NUMERIC_SCALEisNULL.DATETIME_PRECISIONshows the Domain’s fractional-seconds precision (for ‘TIME’, ‘TIMESTAMP’, ‘TIME WITH TIME ZONE’, ‘TIMESTAMP WITH TIME ZONE’, ‘INTERVAL’). For other <data type>s,DATETIME_PRECISIONisNULL.INTERVAL_TYPEshows the Domain’s interval type (for ‘INTERVAL’): either ‘YEAR’, ‘MONTH’, ‘DAY’, ‘HOUR’, ‘MINUTE’, ‘SECOND’, ‘YEAR TO MONTH’, ‘DAY TO HOUR’, ‘DAY TO MINUTE’, ‘DAY TO SECOND’, ‘HOUR TO MINUTE’, ‘HOUR TO SECOND’, ‘MINUTE TO SECOND’. For other <data type>s,INTERVAL_TYPEisNULL.INTERVAL_PRECISIONshows the Domain’s precision for the interval leading field (for ‘INTERVAL’). For other <data type>s,INTERVAL_PRECISIONisNULL.DOMAIN_DEFAULTshows the Domain’s default value (presumably the DBMS willCASTthe value to a character string if it must). It will beNULLif the Domain was defined without aDEFAULTclause (and presumably if it was defined withDEFAULT NULL).DOMAIN_DEFAULTwill be ‘TRUNCATED’ if the default value was too long to be stored.USER_DEFINED_TYPE_CATALOG,USER_DEFINED_TYPE_SCHEMA,USER_DEFINED_TYPE_NAMEuniquely identify the UDT that the Domain depends on. If the Domain doesn’t use a UDT, these fields areNULL.
-SCOPE_CATALOG, SCOPE_SCHEMA, SCOPE_NAME uniquely identify the
-Domain´s scope Table. IF the Domain has no scope, these fields are NULL.
If you want to restrict your code to Core SQL, do not reference
INFORMATION_SCHEMA.DOMAINS.
INFORMATION_SCHEMA.DOMAIN_CONSTRAINTS¶
This View has the following Columns:
| Name | Domain | Nullable? |
CONSTRAINT_CATALOG |
SQL_IDENTIFIER |
no |
CONSTRAINT_SCHEMA |
SQL_IDENTIFIER |
no |
CONSTRAINT_NAME |
SQL_IDENTIFIER |
no |
DOMAIN_CATALOG |
SQL_IDENTIFIER |
no |
DOMAIN_SCHEMA |
SQL_IDENTIFIER |
no |
DOMAIN_NAME |
SQL_IDENTIFIER |
no |
IS_DEFERRABLE |
CHARACTER_DATA |
no |
INITIALLY_DEFERRED |
CHARACTER_DATA |
no |
DOMAIN_CONSTRAINTS shows the Domain Constraints (i.e.: the Constraints
defined on Domains in this Catalog) that are owned by the current user.
CONSTRAINT_CATALOG,CONSTRAINT_SCHEMA,CONSTRAINT_NAMEuniquely identify a Domain Constraint owned by the current user.DOMAIN_CATALOG,DOMAIN_SCHEMA,DOMAIN_NAMEuniquely identify the Domain that uses the Constraint.IS_DEFERRABLEis either ‘YES’ (the Constraint isDEFERRABLE) or ‘NO’ (the Constraint isNOT DEFERRABLE).INITIALLY_DEFERREDis either ‘YES’ (the Constraint isINITIALLY DEFERRED) or ‘NO’ (the Constraint isINITIALLY IMMEDIATE).
If you want to restrict your code to Core SQL, do not reference
INFORMATION_SCHEMA.DOMAIN_CONSTRAINTS.
INFORMATION_SCHEMA.DOMAIN_USER_DEFINED_TYPE_USAGE¶
This View has the following Columns:
| Name | Domain | Nullable? |
USER_DEFINED_TYPE_CATALOG |
SQL_IDENTIFIER |
no |
USER_DEFINED_TYPE_SCHEMA |
SQL_IDENTIFIER |
no |
USER_DEFINED_TYPE_NAME |
SQL_IDENTIFIER |
no |
DOMAIN_CATALOG |
SQL_IDENTIFIER |
no |
DOMAIN_SCHEMA |
SQL_IDENTIFIER |
no |
DOMAIN_NAME |
SQL_IDENTIFIER |
no |
DOMAIN_USER_DEFINED_TYPE_USAGE shows the Domains that depend on UDTs in
this Catalog, where the UDT is owned by the current user.
USER_DEFINED_TYPE_CATALOG,USER_DEFINED_TYPE_SCHEMA,USER_DEFINED_TYPE_NAMEuniquely identify a UDT owned by the current user.DOMAIN_CATALOG,DOMAIN_SCHEMA,DOMAIN_NAMEuniquely identify a Domain that uses the UDT.
If you want to restrict your code to Core SQL, do not reference
INFORMATION_SCHEMA.DOMAIN_USER_DEFINED_TYPE_USAGE.
INFORMATION_SCHEMA.ENABLED_ROLES¶
This View has the following Columns:
| Name | Domain | Nullable? |
ROLE_NAME |
SQL_IDENTIFIER |
no |
ENABLED_ROLES shows the enabled roles for the current SQL-session.
ROLE_NAMEuniquely identifies an enabled Role.
If you want to restrict your code to Core SQL, do not reference
INFORMATION_SCHEMA.ENABLED_ROLES.
INFORMATION_SCHEMA.KEY_COLUMN_USAGE¶
This View has the following Columns:
| Name | Domain | Nullable? |
CONSTRAINT_CATALOG |
SQL_IDENTIFIER |
no |
CONSTRAINT_SCHEMA |
SQL_IDENTIFIER |
no |
CONSTRAINT_NAME |
SQL_IDENTIFIER |
no |
TABLE_CATALOG |
SQL_IDENTIFIER |
no |
TABLE_SCHEMA |
SQL_IDENTIFIER |
no |
TABLE_NAME |
SQL_IDENTIFIER |
no |
COLUMN_NAME |
SQL_IDENTIFIER |
no |
ORDINAL_POSITION |
CARDINAL_NUMBER |
no |
KEY_COLUMN_USAGE shows the Columns in this Catalog that are keys in
Constraints owned by the current user.
CONSTRAINT_CATALOG,CONSTRAINT_SCHEMA,CONSTRAINT_NAMEuniquely identify a Constraint owned by the current user.TABLE_CATALOG,TABLE_SCHEMA,TABLE_NAME,COLUMN_NAMEuniquely identify a Column that is a key in the Constraint.ORDINAL_POSITIONis the position of the Column within the Constraint.
If you want to restrict your code to Core SQL, do not reference
INFORMATION_SCHEMA.KEY_COLUMN_USAGE.
INFORMATION_SCHEMA.METHOD_SPECIFICATION¶
This View has the following Columns:
| Name | Domain | Nullable? |
USER_DEFINED_TYPE_CATALOG |
SQL_IDENTIFIER |
no |
USER_DEFINED_TYPE_SCHEMA |
SQL_IDENTIFIER |
no |
USER_DEFINED_TYPE_NAME |
SQL_IDENTIFIER |
no |
METHOD_CATALOG |
SQL_IDENTIFIER |
no |
METHOD_SCHEMA |
SQL_IDENTIFIER |
no |
METHOD_NAME |
SQL_IDENTIFIER |
no |
DATA_TYPE |
CHARACTER_DATA |
no |
CHARACTER_MAXIMUM_LENGTH |
CARDINAL_NUMBER |
yes |
CHARACTER_OCTET_LENGTH |
CARDINAL_NUMBER |
yes |
COLLATION_CATALOG |
SQL_IDENTIFIER |
yes |
COLLATION_SCHEMA |
SQL_IDENTIFIER |
yes |
COLLATION_NAME |
SQL_IDENTIFIER |
yes |
NUMERIC_PRECISION |
CARDINAL_NUMBER |
yes |
NUMERIC_PRECISION_RADIX |
CARDINAL_NUMBER |
yes |
NUMERIC_SCALE |
CARDINAL_NUMBER |
yes |
DATETIME_PRECISION |
CARDINAL_NUMBER |
yes |
INTERVAL_TYPE |
CHARACTER_DATA |
yes |
INTERVAL_PRECISION |
CARDINAL_NUMBER |
yes |
RETURN_USER_DEFINED_TYPE_CATALOG |
SQL_IDENTIFIER |
yes |
RETURN_USER_DEFINED_TYPE_SCHEMA |
SQL_IDENTIFIER |
yes |
RETURN_USER_DEFINED_TYPE_NAME |
SQL_IDENTIFIER |
yes |
METHOD_LANGUAGE |
CHARACTER_DATA |
yes |
PARAMETER_STYLE |
CHARACTER_DATA |
yes |
IS_DETERMINISTIC |
CHARACTER_DATA |
yes |
SQL_DATA_ACCESS |
CHARACTER_DATA |
yes |
IS_NULL_CALL |
CHARACTER_DATA |
yes |
METHOD_SIGNATURE_CREATED |
TIME_STAMP |
yes |
METHOD_SIGNATURE_LAST_ALTERED |
TIME_STAMP |
yes |
METHOD_SIGNATURES shows the SQL-invoked routines in this Catalog that the
current user has Privileges on.
USER_DEFINED_TYPE_CATALOG,USER_DEFINED_TYPE_SCHEMA,USER_DEFINED_TYPE_NAME,METHOD_CATALOG,METHOD_SCHEMA,METHOD_NAMEuniquely identify a SQL-invoked routine that the current user may use.DATA_TYPEshows the routine’s result <data type>: either ‘BINARY LARGE OBJECT’, ‘BIT’, ‘BIT VARYING’, ‘CHARACTER’, ‘CHARACTER VARYING’, ‘CHARACTER LARGE OBJECT’, ‘INTEGER’, ‘SMALLINT’, ‘NUMERIC’, ‘DECIMAL’, ‘REAL’, ‘DOUBLE PRECISION’, ‘FLOAT’, ‘DATE’, ‘TIME’, ‘TIME WITH TIME ZONE’, ‘TIMESTAMP’, ‘TIMESTAMP WITH TIME ZONE’, ‘INTERVAL’, ‘BOOLEAN’, ‘USER-DEFINED TYPE’ – or something else, such as an implementation-defined data type.CHARACTER_MAXIMUM_LENGTHshows the routine’s result maximum length in characters (for ‘CHARACTER’, ‘CHARACTER VARYING’, ‘CHARACTER LARGE OBJECT’) or in bits (for ‘BIT’, ‘BIT VARYING’, ‘BINARY LARGE OBJECT’). For other <data type>s,CHARACTER_MAXIMUM_LENGTHisNULL.CHARACTER_OCTET_LENGTHshows the routine’s result maximum length in octets (for ‘CHARACTER’, ‘CHARACTER VARYING’, ‘CHARACTER LARGE OBJECT’, ‘BIT’, ‘BIT VARYING’, ‘BINARY LARGE OBJECT’). For other <data type>s,CHARACTER_OCTET_LENGTHisNULL.COLLATION_CATALOG,COLLATION_SCHEMA,COLLATION_NAMEuniquely identify the routine’s result default Collation (for ‘CHARACTER’, ‘CHARACTER VARYING’, ‘CHARACTER LARGE OBJECT’). For other <data type>s, these fields areNULL.NUMERIC_PRECISIONshows the routine’s result precision (for ‘INTEGER’, ‘SMALLINT’, ‘NUMERIC’, ‘DECIMAL’, ‘REAL’, ‘FLOAT’, ‘DOUBLE PRECISION’, ‘DATE’, ‘TIME’, ‘TIMESTAMP’, ‘TIME WITH TIME ZONE’, ‘TIMESTAMP WITH TIME ZONE’, ‘INTERVAL’). For other <data type>s,NUMERIC_PRECISIONisNULL.NUMERIC_PRECISION_RADIXis either 2 or 10, depending on your DBMS (for ‘INTEGER’, ‘SMALLINT’, ‘DATE’, ‘TIME’, ‘TIMESTAMP’, ‘TIME WITH TIME ZONE’, ‘TIMESTAMP WITH TIME ZONE’, ‘INTERVAL’), 10 (for ‘NUMERIC’, ‘DECIMAL’), 2 (for ‘REAL’, ‘FLOAT’, ‘DOUBLE PRECISION’. For other <data type>s,NUMERIC_PRECISION_RADIXisNULL.NUMERIC_SCALEis either 0 (for ‘INTEGER’, ‘SMALLINT’) or shows the routine’s result scale (for ‘NUMERIC’, ‘DECIMAL’). For other <data type>s,NUMERIC_SCALEisNULL.DATETIME_PRECISIONshows the routine’s result fractional-seconds precision (for ‘TIME’, ‘TIMESTAMP’, ‘TIME WITH TIME ZONE’, ‘TIMESTAMP WITH TIME ZONE’, ‘INTERVAL’). For other <data type>s,DATETIME_PRECISIONisNULL.INTERVAL_TYPEshows the routine’s result interval type (for ‘INTERVAL’): either ‘YEAR’, ‘MONTH’, ‘DAY’, ‘HOUR’, ‘MINUTE’, ‘SECOND’, ‘YEAR TO MONTH’, ‘DAY TO HOUR’, ‘DAY TO MINUTE’, ‘DAY TO SECOND’, ‘HOUR TO MINUTE’, ‘HOUR TO SECOND’, ‘MINUTE TO SECOND’. For other <data type>s,INTERVAL_TYPEisNULL.SQL_DATA_ACCESSis either ‘NONE’ (the SQL-invoked routine does not possibly contain SQL), ‘CONTAINS’ (the SQL-invoked routine possibly contains SQL), ‘READS’ (the SQL-invoked routine possibly reads SQL-data) or ‘MODIFIES’ (the SQL-invoked routine possibly modifies SQL-data).IS_NULL_CALLis either ‘YES’ (the SQL-invoked routine is a null-call- function) or ‘
NO’ (the SQL-invoked routine is not a null-call function). METHOD_SIGNATURE_CREATEDshows theCURRENT_TIMESTAMPfrom the time- the SQL-invoked method signature was created.
METHOD_SIGNATURE_LAST_ALTEREDshows theCURRENT_TIMESTAMPfrom the time the SQL-invoked method signature was last altered. (This will be the same as theMETHOD_SIGNATURE_CREATEDvalue if the routine hasn’t been altered.)
If you want to restrict your code to Core SQL, do not reference
INFORMATION_SCHEMA.METHOD_SIGNATURES.
INFORMATION_SCHEMA.METHOD_SIGNATURE_PARAMETERS¶
This View has the following Columns:
| Name | Domain | Nullable? |
USER_DEFINED_TYPE_CATALOG |
SQL_IDENTIFIER |
no |
USER_DEFINED_TYPE_SCHEMA |
SQL_IDENTIFIER |
no |
USER_DEFINED_TYPE_NAME |
SQL_IDENTIFIER |
no |
METHOD_CATALOG |
SQL_IDENTIFIER |
no |
METHOD_SCHEMA |
SQL_IDENTIFIER |
no |
METHOD_NAME |
SQL_IDENTIFIER |
no |
ORDINAL_POSITION |
CARDINAL_NUMBER |
no |
PARAMETER_MODE |
CHARACTER_DATA |
yes |
IS_RESULT |
CHARACTER_DATA |
yes |
AS_LOCATOR |
CHARACTER_DATA |
yes |
PARAMETER_NAME |
SQL_IDENTIFIER |
yes |
DATA_TYPE |
CHARACTER_DATA |
no |
CHARACTER_MAXIMUM_LENGTH |
CARDINAL_NUMBER |
yes |
CHARACTER_OCTET_LENGTH |
CARDINAL_NUMBER |
yes |
COLLATION_CATALOG |
SQL_IDENTIFIER |
yes |
COLLATION_SCHEMA |
SQL_IDENTIFIER |
yes |
COLLATION_NAME |
SQL_IDENTIFIER |
yes |
CHARACTER_SET_CATALOG |
SQL_IDENTIFIER |
no |
CHARACTER_SET_SCHEMA |
SQL_IDENTIFIER |
no |
CHARACTER_SET_NAME |
SQL_IDENTIFIER |
no |
NUMERIC_PRECISION |
CARDINAL_NUMBER |
yes |
NUMERIC_PRECISION_RADIX |
CARDINAL_NUMBER |
yes |
NUMERIC_SCALE |
CARDINAL_NUMBER |
yes |
DATETIME_PRECISION |
CARDINAL_NUMBER |
yes |
INTERVAL_TYPE |
CHARACTER_DATA |
yes |
INTERVAL_PRECISION |
CARDINAL_NUMBER |
yes |
USER_DEFINED_TYPE_NAME |
SQL_IDENTIFIER |
yes |
METHOD_SIGNATURE_PARAMETERS shows the parameters of the SQL-invoked methods
in this Catalog that the current user has Privileges on.
USER_DEFINED_TYPE_CATALOG,USER_DEFINED_TYPE_SCHEMA,USER_DEFINED_TYPE_NAMEuniquely identify the UDT that a parameter is associated with.METHOD_CATALOG,METHOD_SCHEMA,METHOD_NAMEuniquely identify the SQL-invoked method that contains the parameter.ORDINAL_POSITIONshows the ordinal position of the parameter in its SQL-invoked method.PARAMETER_MODEis either ‘IN’ (the parameter is an input parameter), ‘OUT’ (the parameter is an output parameter) or ‘INOUT’ (the parameter is both an input and an output parameter).IS_RESULTis either ‘YES’ (the parameter is theRESULTparameter of a type-preserving function) or ‘NO’ (the parameter is not theRESULTparameter of a type-preserving function).AS_LOCATORis either ‘YES’ (the parameter is passedAS LOCATOR) or ‘NO’ (the parameter is not passedAS LOCATOR).PARAMETER_NAMEis the name of the parameter, if it was specified when the SQL-invoked routine was created. Otherwise,PARAMETER_NAMEisNULL.DATA_TYPEshows the parameter’s <data type>: either ‘BINARY LARGE OBJECT’, ‘BIT’, ‘BIT VARYING’, ‘CHARACTER’, ‘CHARACTER VARYING’, ‘CHARACTER LARGE OBJECT’, ‘INTEGER’, ‘SMALLINT’, ‘NUMERIC’, ‘DECIMAL’, ‘REAL’, ‘DOUBLE PRECISION’, ‘FLOAT’, ‘DATE’, ‘TIME’, ‘TIME WITH TIME ZONE’, ‘TIMESTAMP’, ‘TIMESTAMP WITH TIME ZONE’, ‘INTERVAL’, ‘BOOLEAN’, ‘USER-DEFINED TYPE’ – or something else, such as an implementation-defined data type.CHARACTER_MAXIMUM_LENGTHshows the parameter’s maximum length in characters (for ‘CHARACTER’, ‘CHARACTER VARYING’, ‘CHARACTER LARGE OBJECT’) or in bits (for ‘BIT’, ‘BIT VARYING’, ‘BINARY LARGE OBJECT’). For other <data type>s,CHARACTER_MAXIMUM_LENGTHisNULL.CHARACTER_OCTET_LENGTHshows the parameter’s maximum length in octets (for ‘CHARACTER’, ‘CHARACTER VARYING’, ‘CHARACTER LARGE OBJECT’, ‘BIT’, ‘BIT VARYING’, ‘BINARY LARGE OBJECT’). For other <data type>s,CHARACTER_OCTET_LENGTHisNULL.COLLATION_CATALOG,COLLATION_SCHEMA,COLLATION_NAMEuniquely identify the parameter’s default Collation (for ‘CHARACTER’, ‘CHARACTER VARYING’, ‘CHARACTER LARGE OBJECT’). For other <data type>s, these fields areNULL.CHARACTER_SET_CATALOG,CHARACTER_SET_SCHEMA,CHARACTER_SET_NAMEuniquely identify the Character set on which the parameter’s default Collation is defined.NUMERIC_PRECISIONshows the parameter’s precision (for ‘INTEGER’, ‘SMALLINT’, ‘NUMERIC’, ‘DECIMAL’, ‘REAL’, ‘FLOAT’, ‘DOUBLE PRECISION’, ‘DATE’, ‘TIME’, ‘TIMESTAMP’, ‘TIME WITH TIME ZONE’, ‘TIMESTAMP WITH TIME ZONE’, ‘INTERVAL’). For other <data type>s,NUMERIC_PRECISIONisNULL.NUMERIC_PRECISION_RADIXis either 2 or 10, depending on your DBMS (for ‘INTEGER’, ‘SMALLINT, ‘DATE’, ‘TIME’, ‘TIMESTAMP’, ‘TIME WITH TIME ZONE’, ‘TIMESTAMP WITH TIME ZONE’, ‘INTERVAL’), 10 (for ‘NUMERIC’, ‘DECIMAL’), 2 (for ‘REAL’, ‘FLOAT’, ‘DOUBLE PRECISION’. For other <data type>s,NUMERIC_PRECISION_RADIXisNULL.NUMERIC_SCALEis either 0 (for ‘INTEGER’, ‘SMALLINT’) or shows the parameter’s scale (for ‘NUMERIC’, ‘DECIMAL’). For other <data type>s,NUMERIC_SCALEisNULL.DATETIME_PRECISIONshows the parameter’s fractional-seconds precision (for ‘TIME’, ‘TIMESTAMP’, ‘TIME WITH TIME ZONE’, ‘TIMESTAMP WITH TIME ZONE’, ‘INTERVAL’). For other <data type>s,DATETIME_PRECISIONisNULL.INTERVAL_TYPEshows the parameter’s interval type (for ‘INTERVAL’); either ‘YEAR’, ‘MONTH’, ‘DAY’, ‘HOUR’, ‘MINUTE’, ‘SECOND’, ‘YEAR TO MONTH’, ‘DAY TO HOUR’, ‘DAY TO MINUTE’, ‘DAY TO SECOND’, ‘HOUR TO MINUTE’, ‘HOUR TO SECOND’, ‘MINUTE TO SECOND’. For other <data type>s,INTERVAL_TYPEisNULL.INTERVAL_PRECISIONshows the parameter’s precision for the interval leading field (for ‘INTERVAL’). For other <data type>s,INTERVAL_PRECISIONisNULL.USER_DEFINED_TYPE_NAME,USER_DEFINED_TYPE_SCHEMA,USER_DEFINED_TYPE_NAMEuniquely identify the UDT that the parameter uses. If no UDT is used, this field isNULL.
If you want to restrict your code to Core SQL, do not reference
INFORMATION_SCHEMA.METHOD_SIGNATURE_PARAMETERS.
INFORMATION_SCHEMA.PARAMETERS¶
This View has the following Columns:
| Name | Domain | Nullable? |
SPECIFIC_CATALOG |
SQL_IDENTIFIER |
no |
SPECIFIC_SCHEMA |
SQL_IDENTIFIER |
no |
SPECIFIC_NAME |
SQL_IDENTIFIER |
no |
ORDINAL_POSITION |
CARDINAL_NUMBER |
no |
PARAMETER_MODE |
CHARACTER_DATA |
yes |
IS_RESULT |
CHARACTER_DATA |
yes |
AS_LOCATOR |
CHARACTER_DATA |
yes |
PARAMETER_NAME |
SQL_IDENTIFIER |
yes |
DATA_TYPE |
CHARACTER_DATA |
no |
CHARACTER_MAXIMUM_LENGTH |
CARDINAL_NUMBER |
yes |
CHARACTER_OCTET_LENGTH |
CARDINAL_NUMBER |
yes |
COLLATION_CATALOG |
SQL_IDENTIFIER |
yes |
COLLATION_SCHEMA |
SQL_IDENTIFIER |
yes |
COLLATION_NAME |
SQL_IDENTIFIER |
yes |
CHARACTER_SET_CATALOG |
SQL_IDENTIFIER |
no |
CHARACTER_SET_SCHEMA |
SQL_IDENTIFIER |
no |
CHARACTER_SET_NAME |
SQL_IDENTIFIER |
no |
NUMERIC_PRECISION |
CARDINAL_NUMBER |
yes |
NUMERIC_PRECISION_RADIX |
CARDINAL_NUMBER |
yes |
NUMERIC_SCALE |
CARDINAL_NUMBER |
yes |
DATETIME_PRECISION |
CARDINAL_NUMBER |
yes |
INTERVAL_TYPE |
CHARACTER_DATA |
yes |
INTERVAL_PRECISION |
CARDINAL_NUMBER |
yes |
USER_DEFINED_TYPE_NAME |
SQL_IDENTIFIER |
yes |
PARAMETERS shows the parameters of the SQL-invoked routines in this Catalog
that the current user has Privileges on.
SPECIFIC_CATALOG,SPECIFIC_SCHEMA,SPECIFIC_NAMEuniquely- identify the SQL-invoked routine that contains the parameter being described.
ORDINAL_POSITIONshows the ordinal position of the parameter in its- SQL-invoked routine.
PARAMETER_MODEis either ‘IN’ (the parameter is an input parameter), ‘OUT’ (the parameter is an output parameter) or ‘INOUT’ (the parameter is both an input and an output parameter).IS_RESULTis either ‘YES’ (the parameter is theRESULTparameter of a type-preserving function) or ‘NO’ (the parameter is not theRESULTparameter of a type-preserving function).AS_LOCATORis either ‘YES’ (the parameter is passedAS LOCATOR)- or ‘
NO’ (the parameter is not passedAS LOCATOR). PARAMETER_NAMEis the name of the parameter, if it was specified when the- SQL-invoked routine was created. Otherwise,
PARAMETER_NAMEisNULL. DATA_TYPEshows the parameter’s <data type>: either ‘BINARY LARGE OBJECT’, ‘BIT’, ‘BIT VARYING’, ‘CHARACTER’, ‘CHARACTER VARYING’, ‘CHARACTER LARGE OBJECT’, ‘INTEGER’, ‘SMALLINT’, ‘NUMERIC’, ‘DECIMAL’, ‘REAL’, ‘DOUBLE PRECISION’, ‘FLOAT’, ‘DATE’, ‘TIME’, ‘TIME WITH TIME ZONE’, ‘TIMESTAMP’, ‘TIMESTAMP WITH TIME ZONE’, ‘INTERVAL’, ‘BOOLEAN’, ‘USER-DEFINED #TYPE’ – or something else, such as an implementation-defined data type.CHARACTER_MAXIMUM_LENGTHshows the parameter’s maximum length in characters (for ‘CHARACTER’, ‘CHARACTER VARYING’, ‘CHARACTER LARGE OBJECT’) or in bits (for ‘BIT’, ‘BIT VARYING’, ‘BINARY LARGE OBJECT’). For other <data type>s,CHARACTER_MAXIMUM_LENGTHisNULL.CHARACTER_OCTET_LENGTHshows the parameter’s maximum length in octets (for ‘CHARACTER’, ‘CHARACTER VARYING’, ‘CHARACTER LARGE OBJECT’, ‘BIT’, ‘BIT VARYING’, ‘BINARY LARGE OBJECT’). For other <data type>s,CHARACTER_OCTET_LENGTHisNULL.COLLATION_CATALOG,COLLATION_SCHEMA,COLLATION_NAMEuniquely identify the parameter’s default Collation (for ‘CHARACTER’, ‘CHARACTER VARYING’, ‘CHARACTER LARGE OBJECT’). For other <data type>s, these fields areNULL.CHARACTER_SET_CATALOG,CHARACTER_SET_SCHEMA,CHARACTER_SET_NAMEuniquely identify the Character set on which the parameter’s default Collation is defined.NUMERIC_PRECISIONshows the parameter’s precision (for ‘INTEGER’, ‘SMALLINT’, ‘NUMERIC’, ‘DECIMAL’, ‘REAL’, ‘FLOAT’, ‘DOUBLE PRECISION’, ‘DATE’, ‘TIME’, ‘TIMESTAMP’, ‘TIME WITH TIME ZONE’, ‘TIMESTAMP WITH TIME ZONE’, ‘INTERVAL’). For other <data type>s,NUMERIC_PRECISIONisNULL.NUMERIC_PRECISION_RADIXis either 2 or 10, depending on your DBMS (for ‘INTEGER’, ‘SMALLINT, ‘DATE’, ‘TIME’, ‘TIMESTAMP’, ‘TIME WITH TIME ZONE’, ‘TIMESTAMP WITH TIME ZONE’, ‘INTERVAL’), 10 (for ‘NUMERIC’, ‘DECIMAL’), 2 (for ‘REAL’, ‘FLOAT’, ‘DOUBLE PRECISION’. For other <data type>s,NUMERIC_PRECISION_RADIXisNULL.NUMERIC_SCALEis either 0 (for ‘INTEGER’, ‘SMALLINT’) or shows the parameter’s scale (for ‘NUMERIC’, ‘DECIMAL’). For other <data type>s,NUMERIC_SCALEisNULL.DATETIME_PRECISIONshows the parameter’s fractional-seconds precision (for ‘TIME’, ‘TIMESTAMP’, ‘TIME WITH TIME ZONE’, ‘TIMESTAMP WITH TIME ZONE’, ‘INTERVAL’). For other <data type>s,DATETIME_PRECISIONisNULL.INTERVAL_TYPEshows the parameter’s interval type (for ‘INTERVAL’): either ‘YEAR’, ‘MONTH’, ‘DAY’, ‘HOUR’, ‘MINUTE’, ‘SECOND’, ‘YEAR TO MONTH’, ‘DAY TO HOUR’, ‘DAY TO MINUTE’, ‘DAY TO SECOND’, ‘HOUR TO MINUTE’, ‘HOUR TO SECOND’, ‘MINUTE TO SECOND’. For other <data type>s,INTERVAL_TYPEisNULL.INTERVAL_PRECISIONshows the parameter’s precision for the interval leading field (for ‘INTERVAL’). For other <data type>s,INTERVAL_PRECISIONisNULL.USER_DEFINED_TYPE_CATALOG,USER_DEFINED_TYPE_SCHEMA,USER_DEFINED_TYPE_NAMEuniquely identify the UDT that the parameter uses. If no UDT is used, this field isNULL.
INFORMATION_SCHEMA.REFERENTIAL_CONSTRAINTS¶
This View has the following Columns:
| Name | Domain | Nullable? |
CONSTRAINT_CATALOG |
SQL_IDENTIFIER |
no |
CONSTRAINT_SCHEMA |
SQL_IDENTIFIER |
no |
CONSTRAINT_NAME |
SQL_IDENTIFIER |
no |
UNIQUE_CONSTRAINT_CATALOG |
SQL_IDENTIFIER |
no |
UNIQUE_CONSTRAINT_SCHEMA |
SQL_IDENTIFIER |
no |
UNIQUE_CONSTRAINT_NAME |
SQL_IDENTIFIER |
no |
MATCH_OPTION |
CHARACTER_DATA |
no |
UPDATE_RULE |
CHARACTER_DATA |
no |
DELETE_RULE |
CHARACTER_DATA |
no |
REFERENTIAL_CONSTRAINTS shows the FOREIGN KEY Constraints in this
Catalog, where the Constraints are owned by the current user.
CONSTRAINT_CATALOG,CONSTRAINT_SCHEMA,CONSTRAINT_NAMEuniquely- identify a
FOREIGN KEYConstraint owned by the current user. UNIQUE_CONSTRAINT_CATALOG,CONSTRAINT_SCHEMA,UNIQUE_CONSTRAINT_NAMEuniquely identify theUNIQUEConstraint orPRIMARY KEYConstraint that contains the key which thisFOREIGN KEYConstraint references.MATCH_OPTIONwill be one of: ‘NONE’ (no match type defined), ‘PARTIAL’ (match type ofPARTIALdefined) or ‘FULL’ (match type ofFULLdefined).UPDATE_RULEshows the referential action that will take place onUPDATE: either ‘CASCADE’ (referential action ofCASCADEdefined), ‘SET NULL’ (referential action ofSET NULLdefined), ‘SET DEFAULT’ (referential action ofSET DEFAULTdefined), ‘RESTRICT'(referential action ofRESTRICTdefined) or ‘NO ACTION’ (referential action ofNO ACTIONdefined).DELETE_RULEshows the referential action that will take place onDELETE: either ‘CASCADE’ (referential action ofCASCADEdefined), ‘SET NULL’ (referential action ofSET NULLdefined), ‘SET DEFAULT’ (referential action ofSET DEFAULTdefined), ‘RESTRICT'(referential action ofRESTRICTdefined) or ‘NO ACTION’ (referential action ofNO ACTIONdefined).
INFORMATION_SCHEMA.ROLE_COLUMN_GRANTS¶
This View has the following Columns:
| Name | Domain | Nullable? |
GRANTOR |
SQL_IDENTIFIER |
no |
GRANTEE |
SQL_IDENTIFIER |
no |
TABLE_CATALOG |
SQL_IDENTIFIER |
no |
TABLE_SCHEMA |
SQL_IDENTIFIER |
no |
TABLE_NAME |
SQL_IDENTIFIER |
no |
COLUMN_NAME |
SQL_IDENTIFIER |
no |
PRIVILEGE_TYPE |
CHARACTER_DATA |
no |
ROLE_COLUMN_GRANTS shows the Privileges on Columns in this Catalog that
currently enabled Roles may use.
GRANTORshows the <AuthorizationID> of the user (or perhaps the Role) who granted this Privilege.GRANTEEshows the <AuthorizationID> of the Role that may use the Privilege.TABLE_CATALOG,TABLE_SCHEMA,TABLE_NAME,COLUMN_NAMEuniquely identify the Column to which the Privilege applies.PRIVILEGE_TYPEshows the Privilege granted: either ‘INSERT’, ‘UPDATE’, ‘REFERENCES’ or ‘SELECT’.
If you want to restrict your code to Core SQL, do not reference
INFORMATION_SCHEMA.ROLE_COLUMN_GRANTS.
INFORMATION_SCHEMA.ROLE_ROUTINE_GRANTS¶
This View has the following Columns:
| Name | Domain | Nullable? |
GRANTOR |
SQL_IDENTIFIER |
no |
GRANTEE |
SQL_IDENTIFIER |
no |
SPECIFIC_CATALOG |
SQL_IDENTIFIER |
no |
SPECIFIC_SCHEMA |
SQL_IDENTIFIER |
no |
SPECIFIC_NAME |
SQL_IDENTIFIER |
no |
PRIVILEGE_TYPE |
CHARACTER_DATA |
no |
IS_GRANTABLE |
CHARACTER_DATA |
no |
ROLE_ROUTINE_GRANTS shows the Privileges on SQL-invoked routines in this
Catalog that currently enabled Roles may use.
GRANTORshows the <AuthorizationID> of the user (or perhaps the Role) who granted thisEXECUTEPrivilege.GRANTEEshows the <AuthorizationID> of the Role that may use the Privilege.SPECIFIC_CATALOG,SPECIFIC_SCHEMA,SPECIFIC_NAMEuniquely identify the SQL-invoked routine to which the Privilege applies.PRIVILEGE_TYPEshows the Privilege granted: ‘EXECUTE’.IS_GRANTABLEis either ‘YES’ (Privilege was grantedWITH GRANT OPTION) or ‘NO’ (Privilege was not grantedWITH GRANT OPTION).
If you want to restrict your code to Core SQL, do not reference
INFORMATION_SCHEMA.ROLE_ROUTINE_GRANTS.
INFORMATION_SCHEMA.ROLE_TABLE_GRANTS¶
This View has the following Columns:
| Name | Domain | Nullable? |
GRANTOR |
SQL_IDENTIFIER |
no |
GRANTEE |
SQL_IDENTIFIER |
no |
TABLE_CATALOG |
SQL_IDENTIFIER |
no |
TABLE_SCHEMA |
SQL_IDENTIFIER |
no |
TABLE_NAME |
SQL_IDENTIFIER |
no |
PRIVILEGE_TYPE |
CHARACTER_DATA |
no |
ROLE_TABLE_GRANTS shows the Privileges on Tables in this Catalog that
currently enabled Roles may use.
GRANTORshows the <AuthorizationID> of the user (or perhaps the Role) who- granted this Privilege.
GRANTEEshows the <AuthorizationID> of the Role that may use the- Privilege.
TABLE_CATALOG,TABLE_SCHEMA,TABLE_NAMEuniquely identify the- Table to which the Privilege applies.
PRIVILEGE_TYPEshows the Privilege granted: either ‘DELETE’,- ‘
INSERT’, ‘UPDATE’, ‘REFERENCES’, ‘TRIGGER’ or ‘SELECT’.
If you want to restrict your code to Core SQL, do not reference
INFORMATION_SCHEMA.ROLE_TABLE_GRANTS.
INFORMATION_SCHEMA.ROLE_USAGE_GRANTS¶
This View has the following Columns:
| Name | Domain | Nullable? |
GRANTOR |
SQL_IDENTIFIER |
no |
GRANTEE |
SQL_IDENTIFIER |
no |
OBJECT_CATALOG |
SQL_IDENTIFIER |
no |
OBJECT_SCHEMA |
SQL_IDENTIFIER |
no |
OBJECT_NAME |
SQL_IDENTIFIER |
no |
OBJECT_TYPE |
CHARACTER_DATA |
no |
IS_GRANTABLE |
CHARACTER_DATA |
no |
ROLE_USAGE_GRANTS shows the USAGE Privileges on Objects in this Catalog
that currently enabled Roles may use.
GRANTORshows the <AuthorizationID> of the user (or perhaps the Role) who- granted this Privilege.
GRANTEEshows the <AuthorizationID> of the Role that may use the- Privilege.
OBJECT_CATALOG,OBJECT_SCHEMA,OBJECT_NAME,OBJECT_TYPEuniquely identify the Object – either a Domain, Character set, Collation or Translation – that the Role may use.IS_GRANTABLEis either ‘YES’ (Privilege was grantedWITH GRANT OPTION) or ‘NO’ (Privilege was not grantedWITH GRANT OPTION).
If you want to restrict your code to Core SQL, do not reference
INFORMATION_SCHEMA.ROLE_USAGE_GRANTS.
INFORMATION_SCHEMA.ROLE_USER_DEFINED_TYPE_GRANTS¶
This View has the following Columns:
| Name | Domain | Nullable? |
GRANTOR |
SQL_IDENTIFIER |
no |
GRANTEE |
SQL_IDENTIFIER |
no |
USER_DEFINED_TYPE_CATALOG |
SQL_IDENTIFIER |
no |
USER_DEFINED_TYPE_SCHEMA |
SQL_IDENTIFIER |
no |
USER_DEFINED_TYPE_NAME |
SQL_IDENTIFIER |
no |
PRIVILEGE_TYPE |
CHARACTER_DATA |
no |
IS_GRANTABLE |
CHARACTER_DATA |
no |
ROLE_USER_DEFINED_TYPE_GRANTS shows the Privileges on UDTs in this Catalog
that currently enabled Roles may use.
GRANTORshows the <AuthorizationID> of the user (or perhaps the Role) who granted this Privilege.GRANTEEshows the <AuthorizationID> of the Role that may use the Privilege.USER_DEFINED_TYPE_CATALOG,USER_DEFINED_TYPE_SCHEMA,USER_DEFINED_TYPE_NAMEuniquely identify the UDT the Role may use.PRIVILEGE_TYPEshows the Privilege granted: ‘TYPE USAGE’.IS_GRANTABLEis either ‘YES’ (Privilege was grantedWITH GRANT OPTION) or ‘NO’ (Privilege was not grantedWITH GRANT OPTION).
If you want to restrict your code to Core SQL, do not reference
INFORMATION_SCHEMA.ROLE_USER_DEFINED_TYPE_GRANTS.
INFORMATION_SCHEMA.ROUTINES¶
This View has the following Columns:
| Name | Domain | Nullable? |
SPECIFIC_CATALOG |
SQL_IDENTIFIER |
no |
SPECIFIC_SCHEMA |
SQL_IDENTIFIER |
no |
SPECIFIC_NAME |
SQL_IDENTIFIER |
no |
ROUTINE_CATALOG |
SQL_IDENTIFIER |
yes |
ROUTINE_SCHEMA |
SQL_IDENTIFIER |
yes |
ROUTINE_NAME |
SQL_IDENTIFIER |
yes |
ROUTINE_TYPE |
CHARACTER_DATA |
no |
MODULE_CATALOG |
SQL_IDENTIFIER |
yes |
MODULE_SCHEMA |
SQL_IDENTIFIER |
yes |
MODULE_NAME |
SQL_IDENTIFIER |
yes |
USER_DEFINED_TYPE_CATALOG |
SQL_IDENTIFIER |
yes |
USER_DEFINED_TYPE_SCHEMA |
SQL_IDENTIFIER |
yes |
USER_DEFINED_TYPE_NAME |
SQL_IDENTIFIER |
yes |
DATA_TYPE |
CHARACTER_DATA |
no |
CHARACTER_MAXIMUM_LENGTH |
CARDINAL_NUMBER |
yes |
CHARACTER_OCTET_LENGTH |
CARDINAL_NUMBER |
yes |
COLLATION_CATALOG |
SQL_IDENTIFIER |
yes |
COLLATION_SCHEMA |
SQL_IDENTIFIER |
yes |
COLLATION_NAME |
SQL_IDENTIFIER |
yes |
NUMERIC_PRECISION |
CARDINAL_NUMBER |
yes |
NUMERIC_PRECISION_RADIX |
CARDINAL_NUMBER |
yes |
NUMERIC_SCALE |
CARDINAL_NUMBER |
yes |
DATETIME_PRECISION |
CARDINAL_NUMBER |
yes |
INTERVAL_TYPE |
CHARACTER_DATA |
yes |
INTERVAL_PRECISION |
CARDINAL_NUMBER |
yes |
TYPE_USER_DEFINED_TYPE_CATALOG |
SQL_IDENTIFIER |
yes |
TYPE_USER_DEFINED_TYPE_SCHEMA |
SQL_IDENTIFIER |
yes |
TYPE_USER_DEFINED_TYPE_NAME |
SQL_IDENTIFIER |
yes |
ROUTINE_BODY |
CHARACTER_DATA |
no |
ROUTINE_DEFINITION |
CHARACTER_DATA |
yes |
EXTERNAL_NAME |
SQL_IDENTIFIER |
yes |
EXTERNAL_LANGUAGE |
CHARACTER_DATA |
yes |
PARAMETER_STYLE |
CHARACTER_DATA |
yes |
IS_DETERMINISTIC |
CHARACTER_DATA |
yes |
SQL_DATA_ACCESS |
CHARACTER_DATA |
no |
SQL_PATH |
CHARACTER_DATA |
yes |
SCHEMA_LEVEL_ROUTINE |
CHARACTER_DATA |
yes |
MAX_DYNAMIC_RESULT_SETS |
CARDINAL_NUMBER |
yes |
ROUTINE_CREATED |
TIME_STAMP |
yes |
ROUTINE_LAST_ALTERED |
TIME_STAMP |
yes |
ROUTINES shows the SQL-invoked routines in this Catalog that the current
user has Privileges on.
SPECIFIC_CATALOG,SPECIFIC_SCHEMA,SPECIFIC_NAME,ROUTINE_CATALOG,ROUTINE_SCHEMA,ROUTINE_NAMEuniquely identify an SQL-invoked routine that the current user has Privileges on. Among the routines in this View, you will find all the functions which your DBMS defined in advance: the SQL built-in functions, e.g.:ABS,BIT_LENGTH,CHARACTER_LENGTH,CHAR_LENGTH,LOWER,MOD,OCTET_LENGTH,POSITION,SUBSTRING,UPPER.ROUTINE_TYPEis either ‘PROCEDURE’ (the SQL-invoked routine is an SQL-invoked procedure), ‘FUNCTION’ (the SQL-invoked routine is an SQL-invoked function that is not an SQL-invoked method) or ‘METHOD’ (the SQL-invoked routine is an SQL-invoked method).MODULE_CATALOG,MODULE_SCHEMA,MODULE_NAMEare allNULL.USER_DEFINED_TYPE_CATALOG,USER_DEFINED_TYPE_SCHEMA,USER_DEFINED_TYPE_NAMEuniquely identify the UDT that this SQL-invoked routine is a method of. If the routine is not defined as a method of a UDT, these fields are NULL.DATA_TYPEshows the routine’s result <data type>: either ‘BINARY LARGE OBJECT’, ‘BIT’, ‘BIT VARYING’, ‘CHARACTER’, ‘CHARACTER VARYING’, ‘CHARACTER LARGE OBJECT’, ‘INTEGER’, ‘SMALLINT’, ‘NUMERIC’, ‘DECIMAL’, ‘REAL’, ‘DOUBLE PRECISION’, ‘FLOAT’, ‘DATE’, ‘TIME’, ‘TIME WITH TIME ZONE’, ‘TIMESTAMP’, ‘TIMESTAMP WITH TIME ZONE’, ‘INTERVAL’, ‘BOOLEAN’, ‘USER-DEFINED TYPE’ – or something else, such as an implementation-defined data type.CHARACTER_MAXIMUM_LENGTHshows the routine’s result maximum length in characters (for ‘CHARACTER’, ‘CHARACTER VARYING’, ‘CHARACTER LARGE OBJECT’) or in bits (for ‘BIT’, ‘BIT VARYING’, ‘BINARY LARGE OBJECT’). For other <data type>s,CHARACTER_MAXIMUM_LENGTHisNULL.CHARACTER_OCTET_LENGTHshows the routine’s result maximum length in octets (for ‘CHARACTER’, ‘CHARACTER VARYING’, ‘CHARACTER LARGE OBJECT’, ‘BIT’, ‘BIT VARYING’, ‘BINARY LARGE OBJECT’). For other <data type>s,CHARACTER_OCTET_LENGTHisNULL.COLLATION_CATALOG,COLLATION_SCHEMA,COLLATION_NAMEuniquely identify the routine’s result default Collation (for ‘CHARACTER’, ‘CHARACTER VARYING’, ‘CHARACTER LARGE OBJECT’). For other <data type>s, these fields areNULL.NUMERIC_PRECISIONshows the routine’s result precision (for ‘INTEGER’, ‘SMALLINT’, ‘NUMERIC’, ‘DECIMAL’, ‘REAL’, ‘FLOAT’, ‘DOUBLE PRECISION’, ‘DATE’, ‘TIME’, ‘TIMESTAMP’, ‘TIME WITH TIME ZONE’, ‘TIMESTAMP WITH TIME ZONE’, ‘INTERVAL’). For other <data type>s,NUMERIC_PRECISIONisNULL.NUMERIC_PRECISION_RADIXis either 2 or 10, depending on your DBMS (for ‘INTEGER’, ‘SMALLINT, ‘DATE’, ‘TIME’, ‘TIMESTAMP’, ‘TIME WITH TIME ZONE’, ‘TIMESTAMP WITH TIME ZONE’, ‘INTERVAL’), 10 (for ‘NUMERIC’, ‘DECIMAL’), 2 (for ‘REAL’, ‘FLOAT’, ‘DOUBLE PRECISION’. For other <data type>s,NUMERIC_PRECISION_RADIXisNULL.NUMERIC_SCALEis either 0 (for ‘INTEGER’, ‘SMALLINT’) or shows the routine’s result scale (for ‘NUMERIC’, ‘DECIMAL’). For other <data type>s,NUMERIC_SCALEisNULL.DATETIME_PRECISIONshows the routine’s result fractional-seconds precision (for ‘TIME’, ‘TIMESTAMP’, ‘TIME WITH TIME ZONE’, ‘TIMESTAMP WITH TIME ZONE’, ‘INTERVAL’). For other <data type>s,DATETIME_PRECISIONisNULL.INTERVAL_TYPEshows the routine’s result interval type (for ‘INTERVAL’): either ‘YEAR’, ‘MONTH’, ‘DAY’, ‘HOUR’, ‘MINUTE’, ‘SECOND’, ‘YEAR TO MONTH’, ‘DAY TO HOUR’, ‘DAY TO MINUTE’, ‘DAY TO SECOND’, ‘HOUR TO MINUTE’, ‘HOUR TO SECOND’, ‘MINUTE TO SECOND’. For other <data type>s,INTERVAL_TYPEisNULL.INTERVAL_PRECISIONshows the routine’s result precision for the interval leading field (for ‘INTERVAL’). For other <data type>s,INTERVAL_PRECISIONisNULL.TYPE_USER_DEFINED_TYPE_CATALOG,TYPE_USER_DEFINED_TYPE_SCHEMA,TYPE_USER_DEFINED_TYPE_NAMEuniquely identify a UDT that the routine uses. If no UDT is used, these fields areNULL.SCOPE_CATALOG,SCOPE_SCHEMA,SCOPE_NAMEuniquely identify the routine´s scope. If the routine has no scope, these fields areNULL.ROUTINE_BODYis either ‘SQL’ (the SQL-invoked routine is an SQL routine) or ‘EXTERNAL’ (the SQL-invoked routine is an external routine).- If this SQL-invoked routine is an SQL routine that is not part of an
SQL-server Module definition,
ROUTINE_DEFINITIONshows the routine body. If the routine body was too big to be stored, or if this is not an SQL routine that doesn’t belong to an SQL-server Module definition,ROUTINE_DEFINITIONisNULL. - If this SQL-invoked routine is an external routine (i.e.:
ROUTINE_BODYis ‘EXTERNAL’),EXTERNAL_NAMEshows its external name. IfROUTINE_BODYis ‘SQL’,EXTERNAL_NAMEisNULL. - If this SQL-invoked routine is an external routine (i.e.:
ROUTINE_BODYis ‘EXTERNAL’),EXTERNAL_LANGUAGEshows the language it’s written in: either ‘ADA’, ‘C’, ‘COBOL’, ‘FORTRAN’, ‘MUMPS’, ‘PASCAL’ or ‘PLI’. IfROUTINE_BODYis ‘SQL’,EXTERNAL_LANGUAGEisNULL. - If this SQL-invoked routine is an external routine (i.e.:
ROUTINE_BODYis ‘EXTERNAL’),PARAMETER_STYLEshows its SQL parameter passing style: either ‘SQL’ or ‘GENERAL’. IfROUTINE_BODYis ‘SQL’,PARAMETER_STYLEisNULL. - If this SQL-invoked routine is an external routine (i.e.:
ROUTINE_BODYis ‘EXTERNAL’),IS_DETERMINISTICis either ‘YES’ (routine was defined asDETERMINISTIC) or ‘NO’ (routine was not defined asDETERMINISTIC). IfROUTINE_BODYis ‘SQL’,IS_DETERMINISTICisNULL. SQL_DATA_ACCESSis either ‘NONE’ (the SQL-invoked routine does not possibly contain SQL), ‘CONTAINS’ (the SQL-invoked routine possibly contains SQL), ‘READS’ (the SQL-invoked routine possibly reads SQL-data) or ‘MODIFIES’ (the SQL-invoked routine possibly modifies SQL-data).- If this SQL-invoked routine is an SQL routine,
SQL_PATHshows the SQL-path of the Schema that contains it. Otherwise,SQL_PATHisNULL. SCHEMA_LEVEL_ROUTINEis either ‘YES’ (this is a Schema-level routine) or ‘NO’ (this is not a Schema-level routine).- If this is an SQL-invoked procedure that was defined by an SQL-invoked
routine containing a <maximum dynamic result sets> clause in its definition,
MAX_DYNAMIC_RESULT_SETSshows that value. Otherwise,MAX_DYNAMIC_RESULT_SETSis zero. IS_USER_DEFINED_CASTis either ‘YES’ (the routine is a user-defined cast) or ‘NO’ (the routine is not a user-defined cast).IS_IMPLICIT_INVOCABLEis eiter ‘YES’ (the routine can be implicitly invoked) or ‘NO’ (the routine cannot be implicitly invoked) orNULL(the routine is not a user-defined cast).ROUTINE_CREATEDshows theCURRENT_TIMESTAMPfrom the time this SQL-invoked routine was created.ROUTINE_LAST_ALTEREDshows theCURRENT_TIMESTAMPfrom the time this SQL-invoked routine was last altered. (This will be the same as theROUTINE_CREATEDvalue if the routine hasn’t been altered.)
INFORMATION_SCHEMA.ROUTINE_COLUMN_USAGE¶
This View has the following Columns:
| Name | Domain | Nullable? |
SPECIFIC_CATALOG |
SQL_IDENTIFIER |
no |
SPECIFIC_SCHEMA |
SQL_IDENTIFIER |
no |
SPECIFIC_NAME |
SQL_IDENTIFIER |
no |
ROUTINE_CATALOG |
SQL_IDENTIFIER |
yes |
ROUTINE_SCHEMA |
SQL_IDENTIFIER |
yes |
ROUTINE_NAME |
SQL_IDENTIFIER |
yes |
TABLE_CATALOG |
SQL_IDENTIFIER |
no |
TABLE_SCHEMA |
SQL_IDENTIFIER |
no |
TABLE_NAME |
SQL_IDENTIFIER |
no |
COLUMN_NAME |
SQL_IDENTIFIER |
no |
ROUTINE_COLUMN_USAGE shows the Columns on which SQL-invoked routines in
this Catalog depend, where the Columns are owned by the current user.
SPECIFIC_CATALOG,SPECIFIC_SCHEMA,SPECIFIC_NAME,ROUTINE_CATALOG,ROUTINE_SCHEMA,ROUTINE_NAMEuniquely identify an SQL-invoked routine.TABLE_CATALOG,TABLE_SCHEMA,TABLE_NAME,COLUMN_NAMEuniquely identify a Column that is owned by the current user and upon which this routine depends.
If you want to restrict your code to Core SQL, do not reference
INFORMATION_SCHEMA.ROUTINE_COLUMN_USAGE.
INFORMATION_SCHEMA.ROUTINE_PRIVILEGES¶
This View has the following Columns:
| Name | Domain | Nullable? |
GRANTOR |
SQL_IDENTIFIER |
no |
GRANTEE |
SQL_IDENTIFIER |
no |
SPECIFIC_CATALOG |
SQL_IDENTIFIER |
no |
SPECIFIC_SCHEMA |
SQL_IDENTIFIER |
no |
SPECIFIC_NAME |
SQL_IDENTIFIER |
no |
ROUTINE_CATALOG |
SQL_IDENTIFIER |
yes |
ROUTINE_SCHEMA |
SQL_IDENTIFIER |
yes |
ROUTINE_NAME |
SQL_IDENTIFIER |
yes |
PRIVILEGE_TYPE |
CHARACTER_DATA |
no |
IS_GRANTABLE |
CHARACTER_DATA |
no |
ROUTINE_PRIVILEGES shows the Privileges on SQL-invoked routines in this
Catalog, where the Privileges are either available to, or granted by, the
current user.
GRANTORshows the <AuthorizationID> of the user (or perhaps the Role) who granted the Privilege.GRANTEEshows the <AuthorizationID> of the user (or perhaps the Role) who may use the Privilege. By definition, ifGRANTORisn’tCURRENT_USER, thenGRANTEEis eitherCURRENT_USERor ‘PUBLIC’.SPECIFIC_CATALOG,SPECIFIC_SCHEMA,SPECIFIC_NAME,ROUTINE_CATALOG,ROUTINE_SCHEMA,ROUTINE_NAMEuniquely identify the SQL-invoked routine that this Privilege applies to.PRIVILEGE_TYPEshows the Privilege granted: ‘EXECUTE’.IS_GRANTABLEis either ‘YES’ (Privilege was grantedWITH GRANT OPTION) or ‘NO’ (Privilege was not grantedWITH GRANT OPTION).
INFORMATION_SCHEMA.ROUTINE_TABLE_USAGE¶
This View has the following Columns:
| Name | Domain | Nullable? |
SPECIFIC_CATALOG |
SQL_IDENTIFIER |
no |
SPECIFIC_SCHEMA |
SQL_IDENTIFIER |
no |
SPECIFIC_NAME |
SQL_IDENTIFIER |
no |
ROUTINE_CATALOG |
SQL_IDENTIFIER |
yes |
ROUTINE_SCHEMA |
SQL_IDENTIFIER |
yes |
ROUTINE_NAME |
SQL_IDENTIFIER |
yes |
TABLE_CATALOG |
SQL_IDENTIFIER |
no |
TABLE_SCHEMA |
SQL_IDENTIFIER |
no |
TABLE_NAME |
SQL_IDENTIFIER |
no |
ROUTINE_TABLE_USAGE shows the Tables on which SQL-invoked routines in this
Catalog depend, where the Tables are owned by the current user.
SPECIFIC_CATALOG,SPECIFIC_SCHEMA,SPECIFIC_NAME,ROUTINE_CATALOG,ROUTINE_SCHEMA,ROUTINE_NAMEuniquely identify an SQL-invoked routine in this Catalog.TABLE_CATALOG,TABLE_SCHEMA,TABLE_NAMEuniquely identify a Table that is owned by the current user and upon which this routine depends.
If you want to restrict your code to Core SQL, do not reference
INFORMATION_SCHEMA.ROUTINE_TABLE_USAGE.
INFORMATION_SCHEMA.SCHEMATA¶
This View has the following Columns:
| Name | Domain | Nullable? |
CATALOG_NAME |
SQL_IDENTIFIER |
no |
SCHEMA_NAME |
SQL_IDENTIFIER |
no |
SCHEMA_OWNER |
SQL_IDENTIFIER |
no |
DEFAULT_CHARACTER_SET_CATALOG |
SQL_IDENTIFIER |
no |
DEFAULT_CHARACTER_SET_SCHEMA |
SQL_IDENTIFIER |
no |
DEFAULT_CHARACTER_SET_NAME |
SQL_IDENTIFIER |
no |
SQL_PATH |
CHARACTER_DATA |
yes |
SCHEMATA shows the Schemas in this Catalog that are owned by the current
user.
CATALOG_NAME,SCHEMA_NAMEuniquely identify a Schema owned by the user.SCHEMA_OWNERshows the <AuthorizationID> of the current user. This was the Schema owner specified in the Schema definition.DEFAULT_CHARACTER_SET_CATALOG,DEFAULT_CHARACTER_SET_SCHEMA,DEFAULT_CHARACTER_SET_NAMEuniquely identify the Character set that was specified by aDEFAULT CHARACTER SETclause in the Schema definition. This is the default Character set for the Columns and Domains belonging to this Schema.SQL_PATHshows the contents of the Schema definition’sPATHclause, if there was one. IfPATHwas omitted, or if its value was too large to be stored,SQL_PATHisNULL.
INFORMATION_SCHEMA.SQL_FEATURES¶
This View has the following Columns:
| Name | Domain | Nullable? |
FEATURE_ID |
CHARACTER_DATA |
no |
FEATURE_NAME |
CHARACTER_DATA |
no |
SUB_FEATURE_ID |
CHARACTER_DATA |
no |
SUB_FEATURE_NAME |
CHARACTER_DATA |
no |
IS_SUPPORTED |
CHARACTER_DATA |
no |
IS_VERIFIED_BY |
CHARACTER_DATA |
yes |
FEATURE_COMMENTS |
CHARACTER_DATA |
yes |
SQL_FEATURES shows all the SQL Standard-defined features and subfeatures
(see Appendix B – SQL Taxonomy for a list of these), and marks the ones your
DBMS supports.
FEATURE_ID,SUB_FEATURE_IDuniquely identify an SQL feature or subfeature. IfSUB_FEATURE_IDis zero, this is a feature; otherwise this is a subfeature.FEATURE_NAMEis the name assigned to the feature by the Standard.SUB_FEATURE_NAMEis the name assigned to the subfeature by the Standard. IfSUB_FEATURE_NAMEis a zero-length string, this is a feature; otherwise this is a subfeature.IS_SUPPORTEDis either ‘YES’ (the DBMS fully supports this feature/subfeature) or ‘NO’ (the DBMS doesn’t fully support this feature/subfeature). Note: ifIS_SUPPORTEDis ‘YES’ for a feature, then it must also be ‘YES’ for every subfeature of that feature.- If your DBMS has had its conformance claim for this feature/subfeature
independently tested,
IS_VERIFIED_BYidentifies the conformance test used to verify the claim. If no such verification exists,IS_VERIFIED_BYisNULL. (Note: ifIS_SUPPORTEDis ‘NO’ orNULL,IS_VERIFIED_BYmust beNULL.) FEATURE_COMMENTSis eitherNULL, or shows any implementer’s comments that are pertinent to this feature/subfeature.
If you want to restrict your code to Core SQL, do not reference
INFORMATION_SCHEMA.SQL_FEATURES.
INFORMATION_SCHEMA.SQL_IMPLEMENTATION_INFO¶
This View has the following Columns:
| Name | Domain | Nullable? |
IMPLEMENTATION_INFO_ID |
CHARACTER_DATA |
no |
IMPLEMENTATION_INFO_NAME |
CHARACTER_DATA |
no |
INTEGER_VALUE |
CARDINAL_NUMBER |
yes |
CHARACTER_VALUE |
CHARACTER_DATA |
yes |
IMPLEMENTATION_INFO_COMMENTS |
CHARACTER_DATA |
yes |
SQL_IMPLEMENTATION_INFO lists all the information items that the SQL
Standard states are “implementor-defined” and shows your DBMS’s defined value
for each one.
IMPLEMENTATION_INFO_IDuniquely identifies an implementor-defined information item.IMPLEMENTATION_INFO_NAMEshows the name for thisIMPLEMENTATION_INFO_ID.INTEGER_VALUEandCHARACTER_VALUEshow your DBMS’s defined value for this item. Depending on the item’s type, one field will contain a value and the other will beNULL. IfINTEGER_VALUEis zero, orCHARACTER_VALUEis a zero-length string, then your DBMS’s value for this item is not known. If both fields areNULL, then the value for this item is not applicable for your DBMS, probably because the feature is not supported.IMPLEMENTATION_INFO_COMMENTSis eitherNULL, or shows any implementer’s comments that are pertinent to this item.
If you want to restrict your code to Core SQL, do not reference
INFORMATION_SCHEMA.SQL_IMPLEMENTATION_INFO.
INFORMATION_SCHEMA.SQL_PACKAGES¶
This View has the following Columns:
| Name | Domain | Nullable? |
FEATURES_ID |
CHARACTER DATA |
no |
FEATURE_NAME |
CHARACTER DATA |
no |
IS_SUPPORTED |
CHARACTER DATA |
no |
IS_VERIFIED_BY |
CHARACTER DATA |
yes |
FEATURE_COMMENTS |
CHARACTER DATA |
yes |
SQL_PACKAGES shows all the features that make up an SQL Standard-defined
SQL package (see Chapter 1 “Introduction” for a list of these) and marks that
ones your DBMS supports.
FEATURE_IDuniquely identifies an SQL feature that is part of a package.FEATURE_NAMEis the name assigned to the feature by the Standart.IS_SUPPORTEDis either ‘YES’ (the DBMS fully supports this feature) or ‘NO’ (the DBMS doesn´t fully support this feature).- If your DBMS has had its conformance claim for this feature independently
tested,
IS_VERIFIED_BYidentifies the conformance test used to verify the claim. If no such verification exists,IS_VERIFIED_BYisNULL. (Note: ifIS_SUPPORTEDis ‘NO’ orNULL,IS_VERIFIED_BYmust beNULL.) FEATURE_COMMENTSis eitherNULLor shows any implementor´s comments that are perinent to this feature.
INFORMATION_SCHEMA.SQL_SIZING¶
This View has the following Columns:
| Name | Domain | Nullable? |
SIZING_ID |
CARDINAL_NUMBER |
no |
SIZING_NAME |
CHARACTER_DATA |
no |
SUPPORTED_VALUE |
CARDINAL_NUMBER |
yes |
SIZING_COMMENTS |
CHARACTER_DATA |
yes |
SQL_SIZING lists all the sizing items defined in the SQL Standard and shows
the size supported by your DBMS for each one.
SIZING_IDuniquely identifies a sizing item defined in the SQL Standard.SIZING_NAMEshows the name for thisSIZING_ID.SUPPORTED_VALUEshows the maximum size your DBMS supports for this item. IfSUPPORTED_VALUEisNULL, then your DBMS doesn’t support any features that use this item. IfSUPPORTED_VALUEis zero, then your DBMS either doesn’t place a limit on this item or can’t determine the item’s limit.SIZING_COMMENTSis eitherNULL, or shows any implementer’s comments that are pertinent to this item.
If you want to restrict your code to Core SQL, do not reference
INFORMATION_SCHEMA.SQL_SIZING.
INFORMATION_SCHEMA.SQL_SIZING_PROFILES¶
This View has the following Columns:
| Name | Domain | Nullable? |
SIZING_ID |
CARDINAL_NUMBER |
no |
SIZING_NAME |
CHARACTER_DATA |
no |
PROFILE_ID |
CHARACTER_DATA |
no |
REQUIRED_VALUE |
CARDINAL_NUMBER |
yes |
SIZING_PROFILES_COMMENTS |
CHARACTER_DATA |
yes |
SQL_SIZING_PROFILES lists all the sizing items defined in the SQL Standard
and shows the size required by one or more profiles of the Standard.
SIZING_ID,PROFILE_IDuniquely identify a sizing item for a given profile.SIZING_NAMEis the name for thisSIZING_ID.REQUIRED_VALUEshows the minimum size that this profile requires for this item. IfREQUIRED_VALUEisNULL, then the item isn’t used by any features supported by this profile. IfREQUIRED_VALUEis zero, then this profile doesn’t set a limit for the item.SIZING_PROFILES_COMMENTSis eitherNULL, or shows any implementer’s comments that are pertinent to this item within this profile.
If you want to restrict your code to Core SQL, do not reference
INFORMATION_SCHEMA.SQL_SIZING_PROFILES.
INFORMATION_SCHEMA.SQL_LANGUAGES¶
This View has the following Columns:
| Name | Domain | Nullable? |
SQL_LANGUAGE_SOURCE |
CHARACTER_DATA |
no |
SQL_LANGUAGE_YEAR |
CHARACTER_DATA |
yes |
SQL_LANGUAGE_CONFORMANCE |
CHARACTER_DATA |
yes |
SQL_LANGUAGE_INTEGRITY |
CHARACTER_DATA |
yes |
SQL_LANGUAGE_IMPLEMENTATION |
CHARACTER_DATA |
yes |
SQL_LANGUAGE_BINDING_STYLE |
CHARACTER_DATA |
yes |
SQL_LANGUAGE_PROGRAMMING_LANGUAGE |
CHARACTER_DATA |
yes |
SQL_LANGUAGES shows the SQL conformance levels, options and dialects supported by your DBMS.
SQL_LANGUAGE_SOURCEshows the name of the source of your DBMS’s SQL language definition. For SQL defined by the SQL Standard, this is ‘ISO 9075’. If your DBMS supports some other version of SQL,SQL_LANGUAGE_SOURCEmust show some implementation-defined value, as must all of the Columns in this View. We’ll ignore this possibility when discussing the rest of the Columns.SQL_LANGUAGE_YEARshows the year that the supported version of the SQL Standard was approved: either ‘1987’, ‘1989’, ‘1992’ or ‘1998’. It may not beNULL.SQL_LANGUAGE_CONFORMANCEshows the level of SQL Standard conformance your DBMS claims: for ‘1987’ and ‘1989’, either ‘1’ or ‘2'; for ‘1992’, either ‘ENTRY’, ‘INTERMEDIATE’ or ‘FULL'; and for ‘1998’, ‘CORE’. It may not beNULL.SQL_LANGUAGE_INTEGRITYshows whether the 1989 SQL Standard integrity features are fully supported by your DBMS: for ‘1989’, either ‘YES’ (SQL-89 integrity features fully supported) or ‘NO’ (SQL-89 integrity features not fully supported); it may not be NULL. For ‘1987’, ‘1992’ and ‘1998’, SQL_LANGUAGE_INTEGRITY must be NULL.SQL_LANGUAGE_IMPLEMENTATIONisNULLifSQL_LANGUAGE_SOURCEis ‘ISO 9075’. If your DBMS supports some other version of SQL,SQL_LANGUAGE_IMPLEMENTATIONshows some implementation-defined value.SQL_LANGUAGE_BINDING_STYLEshows the binding style supported by your DBMS: either ‘MODULE’ (SQL-client Module support), ‘EMBEDDED'(embedded SQL support) or ‘DIRECT’ (direct SQL invocation support). It may not be NULL. Note: if your DBMS supports more than one binding style, there will be a separate row in the View for each one.SQL_LANGUAGE_PROGRAMMING_LANGUAGEshows the host language supported by your DBMS for this binding style: (a) for ‘DIRECT’, this Column isNULL; (b) for ‘1987’ and ‘1989’ and either ‘EMBEDDED’ or ‘MODULE’, either ‘COBOL’, ‘FORTRAN’, ‘PASCAL’ or ‘PLI'and (c) for ‘1992’ and either ‘EMBEDDED’ or ‘MODULE’, either ‘ADA’, ‘C’, ‘COBOL’, ‘FORTRAN’, ‘MUMPS’, ‘PASCAL’ or ‘PLI’. Note: if your DBMS supports more than one host language for this binding style, there will be a separate row in the View for each one.
INFORMATION_SCHEMA.TABLES¶
This View has the following Columns:
| Name | Domain | Nullable? |
TABLE_CATALOG |
SQL_IDENTIFIER |
no |
TABLE_SCHEMA |
SQL_IDENTIFIER |
no |
TABLE_NAME |
SQL_IDENTIFIER |
no |
TABLE_TYPE |
CHARACTER_DATA |
no |
TABLES shows the Tables (i.e.: Base tables and Views) in this Catalog that
the current user has Privileges on.
TABLE_CATALOG,TABLE_SCHEMA,TABLE_NAMEuniquely identify a Table which the current user may use – i.e.:CURRENT_USER(orPUBLIC) has any Privilege on the Table or on any Column of the Table.TABLE_TYPEis either: ‘BASE TABLE’ (for a persistent Base table), ‘VIEW’ (for a View), ‘LOCAL TEMPORARY’ (for a local temporary Table) or ‘GLOBAL TEMPORARY’ (for a global temporary Table). Note: instead of ‘BASE TABLE’ some DBMSs will return ‘TABLE’ because (for some reason or other) Delphi expects ‘TABLE’ here.SELF_REFERENCING_COLUMN_NAMEshows the name of the Table´s self-referencing Column. If the Table has no self-referencing Column, this field isNULL.REFERNECE_GENERATIONis either ‘SYSTEM GENERATED’ (reference types are system generated) or ‘USER GENERATED’ (refernece types are user generated) or ‘DERIVED’ (reference types are derived from corresponding Columns) orNULL(reference types don´t apply to this Table.)
INFORMATION_SCHEMA.TABLE_CONSTRAINTS¶
This View has the following Columns:
| Name | Domain | Nullable? |
CONSTRAINT_CATALOG |
SQL_IDENTIFIER |
no |
CONSTRAINT_SCHEMA |
SQL_IDENTIFIER |
no |
CONSTRAINT_NAME |
SQL_IDENTIFIER |
no |
TABLE_CATALOG |
SQL_IDENTIFIER |
no |
TABLE_SCHEMA |
SQL_IDENTIFIER |
no |
TABLE_NAME |
SQL_IDENTIFIER |
no |
CONSTRAINT_TYPE |
CHARACTER_DATA |
no |
IS_DEFERRABLE |
CHARACTER_DATA |
no |
INITIALLY_DEFERRED |
CHARACTER_DATA |
no |
TABLE_CONSTRAINTS shows the Table Constraints in this Catalog, where the
Constraints are owned by the current user.
CONSTRAINT_CATALOG,CONSTRAINT_SCHEMA,CONSTRAINT_NAMEuniquely identify a Constraint owned by the current user.TABLE_CATALOG,TABLE_SCHEMA,TABLE_NAMEuniquely identify the Table to which this Constraint applies.CONSTRAINT_TYPEis either: ‘UNIQUE’, ‘PRIMARY KEY’, ‘FOREIGN KEY’ or ‘CHECK’.IS_DEFERRABLEis either ‘YES’ (the Constraint is DEFERRABLE) or ‘NO’ (the Constraint isNOT DEFERRABLE).INITIALLY_DEFERREDis either ‘YES’ (the Constraint isINITIALLY DEFERRED) or ‘NO’ (the Constraint isINITIALLY IMMEDIATE).
INFORMATION_SCHEMA.TABLE_METHOD_RIVILEGES¶
This View has the following Columns:
| Name | Domain | Nullable? |
GRANTOR |
SQL_IDENTIFIER |
no |
GRANTEE |
SQL_IDENTIFIER |
no |
TABLE_CATALOG |
SQL_IDENTIFIER |
no |
TABLE_SCHEMA |
SQL_IDENTIFIER |
no |
TABLE_NAME |
SQL_IDENTIFIER |
no |
PRIVILEGE_TYPE |
CHARACTER_DATA |
no |
IS_GRANTABLE |
CHARACTER_DATA |
no |
TABLE_METHOD_PRIVILEGES shows the EXECUTE Privileges on methods in this
Catalog, where the Privileges are either available to, or granted by, the
current user.
GRANTORshows the <AuthorizationID> of the user (or perhaps the Role) who granted the Privilege.GRANTEEshows the <AuthorizationID> of the user (or perhaps the Role) who may use the Privilege. By definition, ifGRANTORisn’tCURRENT_USER, thenGRANTEEis eitherCURRENT_USERor ‘PUBLIC’.TABLE_CATALOG,TABLE_SCHEMA,TABLE_NAMEuniquely identify a Table in this Catalog.PRIVILEGE_TYPEshows the Privilege granted: either ‘INSERT’, ‘UPDATE’, ‘REFERENCES’, ‘DELETE’, ‘TRIGGER’ or ‘SELECT’.IS_GRANTABLEis either ‘YES’ (Privilege was grantedWITH GRANT OPTION) or ‘NO’ (Privilege was not grantedWITH GRANT OPTION).
If you want to restrict your code to Core SQL, do not reference
INFORMATION_SCHEMA.TABLE_PRIVILEGES.
INFORMATION_SCHEMA.TABLE_PRIVILEGES¶
This View has the following Columns:
| Name | Domain | Nullable? |
GRANTOR |
SQL_IDENTIFIER |
no |
GRANTEE |
SQL_IDENTIFIER |
no |
TABLE_CATALOG |
SQL_IDENTIFIER |
no |
TABLE_SCHEMA |
SQL_IDENTIFIER |
no |
TABLE_NAME |
SQL_IDENTIFIER |
no |
PRIVILEGE_TYPE |
CHARACTER_DATA |
no |
IS_GRANTABLE |
CHARACTER_DATA |
no |
WITH_HIERARCHY |
CHARACTER_DATA |
yes |
TABLE_PRIVILEGES shows the Privilege on Tables in this Catalog, where the
Privileges are either avaliable to, or granted by, the current user.
GRANTORshows the <AuthorizationID> who granted the Privilege.GRANTEEshows the <AuthorizationID> who may use the Privilege. By definition, ifGRANTORisn’tCURRENT_USER, thenGRANTEEis eitherCURRENT_USERor ‘PUBLIC’.TABLE_CATALOG,TABLE_SCHEMA,TABLE_NAMEuniquely identify a Table in this Catalog.PRIVILEGES_TYPEshows the Privilege granted: either ‘INSERT’, ‘UPDATE’, ‘REFERENCES’, ‘DELETE’, ‘TRIGGER’, or ‘SELECT’.IS_GRANTABLEis either ‘YES’ (Privilege was grantedWITH GRANT OPTION) or ‘NO’ (Privilege was not grantedWITH GRANT OPTION).WITH_HIERARCHYis ‘YES’ (this is aSELECTPrivilege grantedWITH WITH_HIERARCHY OPTION) or ‘NO’ (this is aSELECTPrivilege that was not grantedWITH HIERARCHY OPTION) orNULL(this is not aSELECTPrivilege).
If you want to restrict your code to Core SQL, do not reference
INFORMATION_SCHEMA.TRANSFORMS.
INFORMATION_SCHEMA.TRANSFORMS¶
This View has the following Columns:
| Name | Domain | Nullable? |
USER_DEFINED_TYPE_CATALOG |
SQL_IDENTIFIER |
no |
USER_DEFINED_TYPE_SCHEMA |
SQL_IDENTIFIER |
no |
USER_DEFINED_TYPE_NAME |
SQL_IDENTIFIER |
no |
SPECIFIC_CATALOG |
SQL_IDENTIFIER |
yes |
SPECIFIC_SCHEMA |
SQL_IDENTIFIER |
yes |
SPECIFIC_NAME |
SQL_IDENTIFIER |
yes |
GROUP_NAME |
SQL_IDENTIFIER |
no |
TRANSFORM_TYPE |
CHARACTER_DATA |
no |
TRANSFORMS shows the transforms on UDTs in this Catalog, where the
transforms may be used by the current user.
USER_DEFINED_TYPE_CATALOG,USER_DEFINED_TYPE_SCHEMA,USER_DEFINED_TYPE_NAMEuniquely identify the UDT to which this transform applies.SPECIFIC_CATALOG,SPECIFIC_SCHEMA,SPECIFIC_NAMEuniquely identify the SQL-invoked routine that acts as the transform function for this transform.GROUP_NAMEis the name of the transform group.TRANSFORM_TYPEis either: ‘TO SQL’ (the transform is a to-sql function) or ‘FROM SQL’ (the transform is a from-sql function).
If you want to restrict your code to Core SQL, do not reference
INFORMATION_SCHEMA.TRANSFORMS.
INFORMATION_SCHEMA.TRANSLATIONS¶
This View has the following Columns:
| Name | Domain | Nullable? |
TRANSLATION_CATALOG |
SQL_IDENTIFIER |
no |
TRANSLATION_SCHEMA |
SQL_IDENTIFIER |
no |
TRANSLATION_NAME |
SQL_IDENTIFIER |
no |
SOURCE_CHARACTER_SET_CATALOG |
SQL_IDENTIFIER |
no |
SOURCE_CHARACTER_SET_SCHEMA |
SQL_IDENTIFIER |
no |
SOURCE_CHARACTER_SET_NAME |
SQL_IDENTIFIER |
no |
TARGET_CHARACTER_SET_CATALOG |
SQL_IDENTIFIER |
no |
TARGET_CHARACTER_SET_SCHEMA |
SQL_IDENTIFIER |
no |
TARGET_CHARACTER_SET_NAME |
SQL_IDENTIFIER |
no |
TRANSLATION_DEFINITION |
CHARACTER_DATA |
no |
TRANSLATIONS shows the Translations in this Catalog that the current user
has Privileges on.
TRANSLATION_CATALOG,TRANSLATION_SCHEMA,TRANSLATION_NAMEuniquely identify a Translation that the current user may use.SOURCE_CHARACTER_SET_CATALOG,SOURCE_CHARACTER_SET_SCHEMA,SOURCE_CHARACTER_SET_NAMEuniquely identify the Character set named in theFORclause of the Translation definition.TARGET_CHARACTER_SET_CATALOG,TARGET_CHARACTER_SET_SCHEMA,TARGET_CHARACTER_SET_NAMEuniquely identify the Character set named in theTOclause of the Translation definition.
If you want to restrict your code to Core SQL, do not reference
INFORMATION_SCHEMA.TRANSLATIONS.
INFORMATION_SCHEMA.TRIGGERED_UPDATE_COLUMNS¶
This View has the following Columns:
| Name | Domain | Nullable? |
TRIGGER_CATALOG |
SQL_IDENTIFIER |
no |
TRIGGER_SCHEMA |
SQL_IDENTIFIER |
no |
TRIGGER_NAME |
SQL_IDENTIFIER |
no |
EVENT_OBJECT_CATALOG |
SQL_IDENTIFIER |
no |
EVENT_OBJECT_SCHEMA |
SQL_IDENTIFIER |
no |
EVENT_OBJECT_TABLE |
SQL_IDENTIFIER |
no |
EVENT_OBJECT_COLUMN |
SQL_IDENTIFIER |
no |
TRIGGERED_UPDATE_COLUMNS shows the Columns in this Catalog that are
referenced by the explicit UPDATE trigger event Columns of a Trigger in
this Catalog, where the Trigger is owned by the current user.
TRIGGER_CATALOG,TRIGGER_SCHEMA,TRIGGER_NAMEuniquely identify a Trigger with a trigger event ofUPDATE. The Trigger is owned by the current user.EVENT_OBJECT_CATALOG,EVENT_OBJECT_SCHEMA,EVENT_OBJECT_TABLE,EVENT_OBJECT_COLUMNuniquely identify a Column that is affected by the Trigger.
INFORMATION_SCHEMA.TRIGGERS¶
This View has the following Columns:
| Name | Domain | Nullable? |
TRIGGER_CATALOG |
SQL_IDENTIFIER |
no |
TRIGGER_SCHEMA |
SQL_IDENTIFIER |
no |
TRIGGER_NAME |
SQL_IDENTIFIER |
no |
EVENT_MANIPULATION |
CHARACTER_DATA |
yes |
EVENT_OBJECT_CATALOG |
SQL_IDENTIFIER |
no |
EVENT_OBJECT_SCHEMA |
SQL_IDENTIFIER |
no |
EVENT_OBJECT_TABLE |
SQL_IDENTIFIER |
no |
CONDITION_TIMING |
CHARACTER_DATA |
yes |
CONDITION_REFERENCE_OLD_TABLE |
SQL_IDENTIFIER |
yes |
CONDITION_REFERENCE_NEW_TABLE |
SQL_IDENTIFIER |
yes |
ACTION_ORDER |
CARDINAL_NUMBER |
no |
ACTION_CONDITION |
CHARACTER_DATA |
yes |
ACTION_STATEMENT |
CHARACTER_DATA |
no |
ACTION_ORIENTATION |
CHARACTER_DATA |
yes |
COLUMN_LIST_IS_IMPLICIT |
SQL_IDENTIFIER |
yes |
TRIGGERS shows the Triggers in this Catalog, where the Triggers are owned
by the current user.
TRIGGER_CATALOG,TRIGGER_SCHEMA,TRIGGER_NAMEuniquely identify a Trigger that is owned by the current user.EVENT_MANIPULATIONis either: ‘INSERT’ (the trigger event isINSERT), ‘DELETE’ (the trigger event isDELETE) or ‘UPDATE'(the trigger event isUPDATE).EVENT_OBJECT_CATALOG,EVENT_OBJECT_SCHEMA,EVENT_OBJECT_TABLEuniquely identify the Table the Trigger acts on.ACTION_ORDERshows the ordinal position of the triggered action in the list of all Triggers on the same Table, where the Triggers have the sameEVENT_MANIPULATION,CONDITION_TIMINGandACTION_ORIENTATIONvalues.ACTION_CONDITIONshows the Trigger’s search condition for its triggered action.ACTION_STATEMENTshows the Trigger’s statement list for its triggered action.ACTION_ORIENTATIONis either: ‘ROW’ (the trigger action isFOR EACH ROW) or ‘STATEMENT’ (the trigger action isFOR EACH STATEMENT).CONDITION_TIMINGis either: ‘BEFORE’ (the trigger action time isBEFORE) or ‘AFTER’ (the trigger action time isAFTER).CONDITION_REFERENCE_OLD_TABLEshows the <old value correlation name> of the Trigger.CONDITION_REFERENCE_NEW_TABLEshows the <new value correlation name> of the Trigger.CONDITION_TIMINGis either: ‘BEFORE’ (the trigger action time isBEFORE) or ‘AFTER’ (the trigger action time isAFTER).CONDITION_REFERENCE_OLD_TABLEshows the <old value correlation name> of the Trigger.CONDITION_REFERENCE_NEW_TABLEshows the <new value correlation name> of the Trigger.TRIGGER_CREATEDshows theCURRENT_TIMESTAMPfrom the time the Trigger was created.
INFORMATION_SCHEMA.TRIGGER_COLUMN_USAGE¶
This View has the following Columns:
| Name | Domain | Nullable? |
TRIGGER_CATALOG |
SQL_IDENTIFIER |
no |
TRIGGER_SCHEMA |
SQL_IDENTIFIER |
no |
TRIGGER_NAME |
SQL_IDENTIFIER |
no |
TABLE_CATALOG |
SQL_IDENTIFIER |
no |
TABLE_SCHEMA |
SQL_IDENTIFIER |
no |
TABLE_NAME |
SQL_IDENTIFIER |
no |
COLUMN_NAME |
SQL_IDENTIFIER |
no |
TRIGGER_COLUMN_USAGE shows the Columns on which Triggers in this Catalog
depend, where the Triggers are owned by the current user.
TRIGGER_CATALOG,TRIGGER_SCHEMA,TRIGGER_NAMEuniquely identify a Trigger that is owned by the current user. The Trigger’s trigger event is either ‘INSERT’ or ‘DELETE’.TABLE_CATALOG,TABLE_SCHEMA,TABLE_NAME,COLUMN_NAMEuniquely identify a Column that this Trigger depends on. The dependence is created by one of two things: either (a) this Column belongs to a Table named in the search condition of this Trigger’s triggered action clause or (b) this Column, or the Table it belongs to, is referred to in a triggered SQL statement of this Trigger’s definition.
If you want to restrict your code to Core SQL, do not reference
INFORMATION_SCHEMA.TRIGGER_COLUMN_USAGE.
INFORMATION_SCHEMA.TRIGGER_TABLE_USAGE¶
This View has the following Columns:
| Name | Domain | Nullable? |
TRIGGER_CATALOG |
SQL_IDENTIFIER |
no |
TRIGGER_SCHEMA |
SQL_IDENTIFIER |
no |
TRIGGER_NAME |
SQL_IDENTIFIER |
no |
TABLE_CATALOG |
SQL_IDENTIFIER |
no |
TABLE_SCHEMA |
SQL_IDENTIFIER |
no |
TABLE_NAME |
SQL_IDENTIFIER |
no |
TRIGGER_TABLE_USAGE shows the Tables on which Triggers in this Catalog
depend, where the Triggers are owned by the current user.
TRIGGER_CATALOG,TRIGGER_SCHEMA,TRIGGER_NAMEuniquely identify a Trigger that is owned by the current user.TABLE_CATALOG,TABLE_SCHEMA,TABLE_NAMEuniquely identify a Table that this Trigger depends on. The dependence is created by one of two things: either (a) this Table is named in the search condition of this Trigger’s triggered action clause or (b) this Table is referred to in a triggered SQL statement of this Trigger’s definition.
INFORMATION_SCHEMA.TYPE_INFO¶
[NON-PORTABLE] The total number of Views in INFORMATION_SCHEMA is
non-standard because the SQL Standard allows vendors to add additional Views to
describe additional, implementation-defined features. [OCELOT Implementation]
The OCELOT DBMS that comes with this book has one non- standard
INFORMATION_SCHEMA View, called INFORMATION_SCHEMA.TYPE_INFO. The
Standard defines TYPE_INFO as a temporary make-believe Table, in order to
make the CLI SQLGetTypeInfo Catalog function more comprehensible. We decided
that, since TYPE_INFO is effectively a metadata Table, it makes sense to
describe TYPE_INFO here, rather than in our chapter on SQL/CLI Catalog
functions. Though you can’t simply select from TYPE_INFO with most DBMSs,
you can select the same information using the CLI.
This View has the following Columns:
| Name | Data Type | Nullable? |
TYPE_NAME |
VARCHAR(128) |
no |
DATA_TYPE |
SMALLINT |
no |
COLUMN_SIZE |
INTEGER |
yes |
LITERAL_PREFIX |
VARCHAR(128) |
yes |
LITERAL_SUFFIX |
VARCHAR(128) |
yes |
CREATE_PARAMS |
VARCHAR(128) |
yes |
NULLABLE |
SMALLINT |
no |
CASE_SENSITIVE |
SMALLINT |
no |
SEARCHABLE |
SMALLINT |
no |
UNSIGNED_ATTRIBUTE |
SMALLINT |
yes |
FIXED_PREC_SCALE |
SMALLINT |
no |
AUTO_UNIQUE_VALUE |
SMALLINT |
no |
LOCAL_TYPE_NAME |
VARCHAR(128) |
yes |
MINIMUM_SCALE |
INTEGER |
yes |
MAXIMUM_SCALE |
INTEGER |
yes |
SQL_DATA_TYPE |
SMALLINT |
no |
SQL_DATETIME_SUB |
SMALLINT |
yes |
NUM_PREC_RADIX |
INTEGER |
yes |
INTERVAL_PRECISION |
SMALLINT |
yes |
TYPE_INFO shows a description of every SQL predefined <data type> that the
DBMS supports.
TYPE_NAMEshows the name of this <data type>, either: ‘CHARACTER’ (or ‘CHAR’), ‘NUMERIC’, ‘DECIMAL’ (or ‘DEC’), ‘INTEGER’ (or ‘INT’), ‘SMALLINT’, ‘FLOAT’, ‘REAL’, ‘DOUBLE PRECISION’, ‘CHARACTER VARYING’ (or ‘VARCHAR’ or ‘CHAR VARYING’), ‘CLOB’, ‘CLOB LOCATOR’, ‘BIT’, ‘BIT VARYING’, ‘REF’, ‘DATE’, ‘TIME’, ‘TIMESTAMP’, ‘TIME WITH TIME ZONE’, ‘TIMESTAMP WITH TIME ZONE’, ‘INTERVAL YEAR’, ‘INTERVAL MONTH’, ‘INTERVAL DAY’, ‘INTERVAL HOUR’, ‘INTERVAL MINUTE’, ‘INTERVAL SECOND’, ‘INTERVAL YEAR TO MONTH’, ‘INTERVAL DAY TO HOUR’, ‘INTERVAL DAY TO MINUTE’, ‘INTERVAL DAY TO SECOND’, ‘INTERVAL HOUR TO MINUTE’, ‘INTERVAL HOUR TO SECOND’ or ‘INTERVAL MINUTE TO SECOND’, ‘BLOB’, ‘BLOB LOCATOR’, ‘ROW TYPE’, ‘ARRAY’, ‘ARRAY LOCATOR’, ‘BOOLEAN’, ‘USER-DEFINED TYPE’, ‘USER-DEFINED TYPE LOCATOR’. Most implementations give the name in upper case and use the full name, e.g.: ‘DECIMAL’ or ‘INTEGER’ rather than ‘DEC’ or ‘INT’. Sometimes an SQL <data type> can map to several data types. For example, the ‘NUMERIC’ <data type> might also be called ‘MONEY’ or ‘SERIAL’. In that case, it’s implementation-defined whetherTYPE_INFOwill contain only one row, or several rows, to describe this <data type.DATA_TYPEshows the Concise Code Value for this <data type>. These values are as follows:- For ‘
CHARACTER’ the code is:1. - For ‘
NUMERIC’ the code is:2. - For ‘
DECIMAL’ the code is:3. - For ‘
INTEGER’ the code is:4. - For ‘
SMALLINT’ the code is:5. - For ‘
FLOAT’ the code is:6. - For ‘
REAL’ the code is:7. - For ‘
DOUBLE PRECISION’ the code is:8. - For ‘
CHARACTER VARYING’ the code is:12. - For ‘
BIT’ the code is:14. - For ‘
BIT VARYING’ the code is:15. - For ‘
BOOLEAN’ the code is:16. - For ‘
USER-DEFINED TYPE’ the code is:17. - For ‘
USER-DEFINED TYPE LOCATOR’ the code is:18. - For ‘
ROW TYPE’ the code is:19. - For ‘
REF’ the code is:20. - For ‘
BLOB’ the code is:30. - For ‘
BLOB LOCATOR’ the code is:31. - For ‘
CLOB’ the code is:40. - For ‘
CLOB LOCATOR’ the code is:41. - For ‘
ARRAY’ the code is:50. - For ‘
ARRAY LOCATOR’ the code is:51. - For ‘
DATE’ the code is:91. - For ‘
TIME’ the code is:92. - For ‘
TIMESTAMP’ the code is:93. - For ‘
TIME WITH TIME ZONE’ the code is:94. - For ‘
TIMESTAMP WITH TIME ZONE’ the code is:95. - For ‘
INTERVAL YEAR’ the code is:101. - For ‘
INTERVAL MONTH’ the code is:102. - For ‘
INTERVAL DAY’ the code is:103. - For ‘
INTERVAL HOUR’ the code is:104. - For ‘
INTERVAL MINUTE’ the code is:105. - For ‘
INTERVAL SECOND’ the code is:106. - For ‘
INTERVAL YEAR TO MONTH’ the code is:107. - For ‘
INTERVAL DAY TO HOUR’ the code is:108. - For ‘
INTERVAL DAY TO MINUTE’ the code is:109. - For ‘
INTERVAL DAY TO SECOND’ the code is:110. - For ‘
INTERVAL HOUR TO MINUTE’ the code is:111. - For ‘
INTERVAL HOUR TO SECOND’ the code is:112. - For ‘
INTERVAL MINUTE TO SECOND’ the code is:113.
- For ‘
COLUMN_SIZEshows the size of this <data type>, not including the size of the literal prefix or the literal suffix.- For ‘
CHARACTER’, ‘CHARACTER VARYING’ and ‘CLOB’ the size is the maximum possible length in characters supported by the DBMS. - For ‘
NUMERIC’, ‘DECIMAL’, ‘INTEGER’, ‘SMALLINT’, ‘FLOAT’, ‘REAL’ and ‘DOUBLE PRECISION’ the size is the maximum possible precision supported by the DBMS. - For ‘
BIT’, ‘BIT VARYING’ and ‘BLOB’ the size is the maximum possible length in bits supported by the DBMS. - For ‘
DATE’, ‘TIME’, ‘TIMESTAMP’, ‘TIME WITH TIME ZONE’, ‘TIMESTAMP WITH TIME ZONE’ and all the ‘INTERVAL’ types the size is the maximum possible length in positions supported by the DBMS. ‘DATE’ is always 10, ‘TIME’ must be at least 15, ‘TIMESTAMP’ must be at least 26, ‘TIME WITH TIME ZONE’ must be at least 21, ‘TIMESTAMP WITH TIME ZONE’ must be at least 32, ‘INTERVAL YEAR’ must be at least 4, ‘INTERVAL MONTH’, ‘INTERVAL DAY’, ‘INTERVAL HOUR’ and ‘INTERVAL MINUTE’ must be at least 2, ‘INTERVAL SECOND’ must be at least 9, ‘INTERVAL YEAR TO MONTH’ must be at least 7, ‘INTERVAL DAY TO HOUR’, ‘INTERVAL DAY TO MINUTE’ and ‘INTERVAL HOUR TO MINUTE'must be at least 5, ‘INTERVAL DAY TO SECOND’, ‘INTERVAL HOUR TO SECOND’ and ‘INTERVAL MINUTE TO SECOND’ must be at least 12. - For all other types the size is the null value.
- For ‘
LITERAL_PREFIXshows the character string that must precede any literal of this <data type>. If no prefix string is required,LITERAL_PREFIXisNULL.- For ‘
CHARACTER’, ‘CHARACTER VARYING’ and ‘CLOB’ the prefix is: ‘ (i.e.: a single quote mark). - For ‘
BIT’ and ‘BIT VARYING’ the prefix is: either X’ or B’. - For ‘
BLOB’ the prefix is X’. - For ‘
DATE’ the prefix is: ‘DATE’. - For ‘
TIME’ and ‘TIME WITH TIME ZONE’ the prefix is: ‘TIME’. - For ‘
TIMESTAMP’ and ‘TIMESTAMP WITH TIME ZONE’ the prefix is: ‘TIMESTAMP’. - For all the ‘
INTERVAL’ types the prefix is: ‘INTERVAL’. - For all other types the prefix is the null value.
- For ‘
LITERAL_SUFFIXshows the character string that must follow any literal of this <data type>. If no suffix string is required,LITERAL_SUFFIXisNULL.- For ‘
CHARACTER’, ‘CHARACTER VARYING’, ‘CLOB’, ‘BIT’, ‘BIT VARYING’, ‘BLOB’, ‘DATE’, ‘TIME’, ‘TIME WITH TIME ZONE’, ‘TIMESTAMP’ and ‘TIMESTAMP WITH TIME ZONE’ the suffix is: ‘ (i.e.: a single quote mark). - For ‘
INTERVAL YEAR’ the suffix is: ‘YEAR. - For ‘
INTERVAL MONTH’ the suffix is: ‘MONTH. - For ‘
INTERVAL DAY’ the suffix is: ‘DAY. - For ‘
INTERVAL HOUR’ the suffix is: ‘HOUR. - For ‘
INTERVAL MINUTE’ the suffix is: ‘MINUTE. - For ‘
INTERVAL SECOND’ the suffix is: ‘SECOND. - For ‘
INTERVAL YEAR TO MONTH’ the suffix is: ‘YEAR TO MONTH. - For ‘
INTERVAL DAY TO HOUR’ the suffix is: ‘DAY TO HOUR. - For ‘
INTERVAL DAY TO MINUTE’ the suffix is: ‘DAY TO MINUTE. - For ‘
INTERVAL DAY TO SECOND’ the suffix is: ‘DAY TO SECOND. - For ‘
INTERVAL HOUR TO MINUTE’ the suffix is: ‘HOUR TO MINUTE. - For ‘
INTERVAL HOUR TO SECOND’ the suffix is: ‘HOUR TO SECOND. - For ‘
INTERVAL MINUTE TO SECOND’ the suffix is: ‘MINUTE TO SECOND. - For all other types the suffix is the null value.
- For ‘
CREATE_PARAMSis a list of the names (in order, separated by commas) of size-related attributes which can be used in specifications for this <data type>. If no options exist for this <data type>,CREATE_PARAMSisNULL. The possible names are: ‘LENGTH’ (for length), ‘PRECISION’ (for numeric precision, interval leading field precision and fractional seconds precision) or ‘SCALE’ (for numeric scale).- For ‘
CHARACTER’, ‘CHARACTER VARYING’, ‘CLOB’, ‘BIT’, ‘BIT VARYING’ and ‘BLOB’,CREATE_PARAMSis ‘LENGTH’. - For ‘
NUMERIC’ and ‘DECIMAL’,CREATE_PARAMSis ‘PRECISION,SCALE’. - For ‘
FLOAT’, ‘TIME’, ‘TIME WITH TIME ZONE’,TIMESTAMP’ and ‘TIMESTAMP WITH TIME ZONE’,CREATE_PARAMSis ‘PRECISION’. - For ‘
INTERVAL YEAR’, ‘INTERVAL MONTH’, ‘INTERVAL DAY’, ‘INTERVAL HOUR’, ‘INTERVAL MINUTE’, ‘INTERVAL YEAR TO MONTH’, ‘INTERVAL DAY TO HOUR’, ‘INTERVAL DAY TO MINUTE’ and ‘INTERVAL HOUR TO MINUTE’,CREATE_PARAMSis ‘PRECISION’. - For ‘
INTERVAL SECOND’, ‘INTERVAL DAY TO SECOND’, ‘INTERVAL HOUR TO SECOND’ and ‘INTERVAL MINUTE TO SECOND’,CREATE_PARAMSis ‘PRECISION,PRECISION’. - For all other types,
CREATE_PARAMSis the null value.
- For ‘
NULLABLEshows whether this <data type> may containNULLs. It is either: ‘0’ (“false”) if the <data type> may not containNULLs, ‘1’ (“true”) if the <data type> might containNULLs, or ‘2'(“nullable unknown”) if it isn’t known whether the <data type> might containNULLs. In Standard SQL,NULLABLEis always ‘1’ for all predefined <data type>s.CASE_SENSITIVEshows, for the ‘CHARACTER’, ‘CHARACTER VARYING'and ‘CLOB’ <data type>s, whether the default collation of the <data type>’s repertoire is case sensitive. If this is so,CASE_SENSITIVEis ‘1'(“true”). If this is not so, and for all other <data type>s,CASE_SENSITIVEis ‘0’.SEARCHABLEis comprised of two values, and shows the type of predicates that values of this <data type> may be used with. If values based on this <data type> may be used withLIKE, the first value is: ‘1'; if they can’t, the first value is: ‘0’ . If values based on this <data type> may be used with ordinary predicates, the second value is: ‘2'; if they can’t, the second value is: ‘0’. The two values are added together, thusSEARCHABLEis either: ‘0’, ‘1’, ‘2’OR‘3’ for all <data type>s.- For ‘
CHARACTER’, ‘CHARACTER VARYING’, ‘CLOB’ and ‘BLOB’,SEARCHABLEis: ‘3’, i.e.: ‘1’ for ‘works withLIKE’ plus ‘2’ for ‘works with ordinary predicates’. - For all other predefined <data type>s,
SEARCHABLEis: ‘2’, i.e.: ‘0’ for ‘doesn’t work withLIKE’ plus ‘2’ for ‘works with ordinary predicates’. UNSIGNED_ATTRIBUTEshows whether this <data type> is a signed type. It is either: ‘0’ for a signed type, ‘1’ for an unsigned type orNULLfor all non-numeric types.- For ‘
NUMERIC’, ‘DECIMAL’, ‘INTEGER’, ‘SMALLINT’, ‘FLOAT’, ‘REAL’, ‘DOUBLE PRECISION’ and all the ‘INTERVAL'types,UNSIGNED_ATTRIBUTEis: ‘0’. - For ‘
ARRAY LOCATOR’, ‘BLOB LOCATOR’, ‘CLOB LOCATOR’ and ‘USER-DEFINED TYPE LOCATOR’,UNSIGNED_ATTRIBUTEis: ‘1’. - For all other types,
UNSIGNED_ATTRIBUTEis the null value.
- For ‘
FIXED_PREC_SCALEshows whether this <data type> is an exact numeric type with a fixed precision and scale. It is: ‘1’ (“true”) for ‘INTEGER'and ‘SMALLINT’ and ‘0’ (“false”) for all other <data type>s. (In Standard SQL,FIXED_PREC_SCALEis ‘0’ for ‘DECIMAL’ and ‘NUMERIC’ because these <data type>s have user-specifiable precision and scale.)AUTO_UNIQUE_VALUEshows, for this <data type>, whether any new row is guaranteed to be unique when it is inserted; it is either: ‘0’ (“false”) or ‘1’ (“true”). There is no Standard SQL <data type> like this – for all predefined SQL <data type>s,AUTO_UNIQUE_VALUEis: ‘0’ – but many implementations have it, naming it something like ‘SERIAL’. Watch out: just because it’s unique when youINSERT, doesn’t mean it remains unique after youUPDATE.- [NON-PORTABLE]
LOCAL_TYPE_NAMEshows an implementation-defined “localized representation” of this <data type>’sTYPE_NAMEvalue. This could mean that the Albanian term for ‘CHARACTER VARYING’ would appear here; your DBMS should output what would be appropriate in a dialog box. For Standard SQL names,LOCAL_TYPE_NAMEandTYPE_NAMEwould usually be the same. [OCELOT Implementation] The OCELOT DBMS that comes with this book shows the same name in both theTYPE_NAMEand theLOCAL_TYPE_NAMEColumns for all <data type>s. MINIMUM_SCALEshows the minimum possible value of the scale (for <data type>s that have one) or the minimum possible value of a fractional seconds precision (for <data types> that have one). For <data type>s that have neither,MINIMUM_SCALEisNULL.- For ‘
NUMERIC’, ‘DECIMAL’, ‘INTEGER’, ‘SMALLINT’, ‘TIME’, ‘TIMESTAMP’, ‘TIME WITH TIME ZONE’, ‘TIMESTAMP WITH TIME ZONE’, ‘INTERVAL SECOND’, ‘INTERVAL DAY TO SECOND’, ‘INTERVAL HOUR TO SECOND’ and ‘INTERVAL MINUTE TO SECOND’,MINIMUM_SCALEis: ‘0’. - For all other types,
MINIMUM_SCALEis the null value.
- For ‘
MAXIMUM_SCALEshows your DBMS’s maximum possible value of the scale (for <data type>s that have one) or the maximum possible value of a fractional seconds precision (for <data types> that have one). For <data type>s that have neither,MAXIMUM_SCALEisNULL.- For ‘
INTEGER’ and ‘SMALLINT’,MAXIMUM_SCALEis ‘0’. - [NON-PORTABLE] For ‘
NUMERIC’, ‘DECIMAL’, ‘TIME’, ‘TIMESTAMP’, ‘TIME WITH TIME ZONE’, ‘TIMESTAMP WITH TIME ZONE’, ‘INTERVAL SECOND’, ‘INTERVAL DAY TO SECOND’, ‘INTERVAL HOUR TO SECOND’ and ‘INTERVAL MINUTE TO SECOND’,MAXIMUM_SCALEis implementation-defined. [OCELOT Implementation] The OCELOT DBMS that comes with this book shows these maximum scale values:- For ‘
NUMERIC’ and ‘DECIMAL’,MAXIMUM_SCALEis ‘38’. - For ‘
TIME’, ‘TIMESTAMP’, ‘TIME WITH TIME ZONE’, ‘TIMESTAMP WITH TIME ZONE’, ‘INTERVAL SECOND’, ‘INTERVAL DAY TO SECOND’, ‘INTERVAL HOUR TO SECOND’ and ‘INTERVAL MINUTE TO SECOND’,MAXIMUM_SCALEis ‘6’.
- For ‘
- For all other types,
MAXIMUM_SCALEis the null value.
- For ‘
SQL_DATA_TYPEshows the SQL Data Type Code value. This will be the same as theDATA_TYPEvalue for all non-temporal <data type>s. There is a correspondence with theSQL_DESC_TYPEfield of a descriptor.- For ‘
CHARACTER’ the code is: ‘1’. - For ‘
NUMERIC’ the code is: ‘2’. - For ‘
DECIMAL’ the code is: ‘3’. - For ‘
INTEGER’ the code is: ‘4’. - For ‘
SMALLINT’ the code is: ‘5’. - For ‘
FLOAT’ the code is: ‘6’. - For ‘
REAL’ the code is: ‘7’. - For ‘
DOUBLE PRECISION’ the code is: ‘8’. - For ‘
CHARACTER VARYING’ the code is: ‘12’. - For ‘
BIT’ the code is: ‘14’. - For ‘
BIT VARYING’ the code is: ‘15’. - For ‘
REF’ the code is: ‘20’. - For ‘
DATE’, ‘TIME’, ‘TIMESTAMP’, ‘TIME WITH TIME ZONE’ and ‘TIMESTAMP WITH TIME ZONE’ the code is: ‘9’. - For all the ‘
INTERVAL’ types the code is: ‘10’.
- For ‘
SQL_DATETIME_SUBshows theSQL_DATA-TYPEsubtype for the temporal <data type>s. For all the non-temporal <data type>s, this field isNULL.- For ‘
DATE’ the code is: ‘1’. - For ‘
TIME’ the code is: ‘2’. - For ‘
TIMESTAMP’ the code is: ‘3’. - For ‘
TIME WITH TIME ZONE’ the code is: ‘4’. - For ‘
TIMESTAMP WITH TIME ZONE’ the code is: ‘5’. - For ‘
INTERVAL YEAR’ the code is: ‘1’. - For ‘
INTERVAL MONTH’ the code is: ‘2’. - For ‘
INTERVAL DAY’ the code is: ‘3’. - For ‘
INTERVAL HOUR’ the code is: ‘4’. - For ‘
INTERVAL MINUTE’ the code is: ‘5’. - For ‘
INTERVAL SECOND’ the code is: ‘6’. - For ‘
INTERVAL YEAR TO MONTH’ the code is: ‘7’. - For ‘
INTERVAL DAY TO HOUR’ the code is: ‘8’. - For ‘
INTERVAL DAY TO MINUTE’ the code is: ‘9’. - For ‘
INTERVAL DAY TO SECOND’ the code is: ‘10’. - For ‘
INTERVAL HOUR TO MINUTE’ the code is: ‘11’. - For ‘
INTERVAL HOUR TO SECOND’ the code is: ‘12’. - For ‘
INTERVAL MINUTE TO SECOND’ the code is: ‘13’.
- For ‘
NUM_PREC_RADIXshows your DBMS’s radix of the precision for this <data type> (if there is one). If there is no precision, this field isNULL. For exact numeric <data type>s, the precision’s radix will almost always be 10 (indeed for ODBC it must be 10), but some implementations declare thatSMALLINTandINTEGERhave binary radices, om whoch caseCOLUMN_SIZEwould be respectively 15 and 31 (the number does not include the sign bit). For approximate numeric <data type>s, the precision’s radix will usually be 2.- [NON-PORTABLE] For ‘
NUMERIC’, ‘DECIMAL’, ‘INTEGER’, ‘SMALLINT’, ‘FLOAT’, ‘REAL’ and ‘DOUBLE PRECISION’,NUM_PREC_RADIXis implementation-defined. [OCELOT Implementation] The OCELOT DBMS that comes with this book shows these radix values:- For ‘
NUMERIC’ and ‘DECIMAL’,NUM_PREC_RADIXis: ‘10’. - For ‘
INTEGER’, ‘SMALLINT’, ‘FLOAT’, ‘REAL’ and ‘DOUBLE PRECISION’,NUM_PREC_RADIXis: ‘2’. - For all other types,
NUM_PREC_RADIXis the null value.
- For ‘
- [NON-PORTABLE] For ‘
INTERVAL_PRECISIONshows your DBMS’s interval leading field precision for anINTERVAL<data type>. If this is not anINTERVAL,INTERVAL_PRECISIONisNULL.- [NON-PORTABLE] For all the ‘
INTERVAL’ types,INTERVAL_PRECISIONis implementation-defined. [OCELOT Implementation] The OCELOT DBMS that comes with this book shows these interval precision values:- For ‘
INTERVAL YEAR’ and ‘INTERVAL YEAR TO MONTH,INTERVAL PRECISIONis: ‘4’. - For all other ‘
INTERVAL’ types,INTERVAL_PRECISIONis: ‘2’.
- For ‘
INFORMATION_SCHEMA.USAGE_PRIVILEGES¶
This View has the following Columns:
| Name | Domain | Nullable? |
GRANTOR |
SQL_IDENTIFIER |
no |
GRANTEE |
SQL_IDENTIFIER |
no |
OBJECT_CATALOG |
SQL_IDENTIFIER |
no |
OBJECT_SCHEMA |
SQL_IDENTIFIER |
no |
OBJECT_NAME |
SQL_IDENTIFIER |
no |
OBJECT_TYPE |
CHARACTER_DATA |
no |
PRIVILEGE_TYPE |
CHARACTER_DATA |
no |
IS_GRANTABLE |
CHARACTER_DATA |
no |
USAGE_PRIVILEGES shows the USAGE Privileges on Objects (i.e.: Domains,
Character sets, Collations or Translations) in this Catalog, where the
Privileges are either available to, or granted by, the current user.
GRANTORshows the <AuthorizationID> of the user (or perhaps the Role) who granted the Privilege.GRANTEEshows the <AuthorizationID> of the user (or perhaps the Role) who may use the Privilege. By definition, ifGRANTORisn’tCURRENT_USER, thenGRANTEEis eitherCURRENT_USERor ‘PUBLIC’.OBJECT_CATALOG,OBJECT_SCHEMA,OBJECT_NAME,OBJECT_TYPEuniquely identify an Object in this Catalog.OBJECT_TYPEis either: ‘DOMAIN’, ‘CHARACTER SET’, ‘COLLATION’ or ‘TRANSLATION’.PRIVILEGE_TYPEshows the Privilege granted: ‘USAGE’.IS_GRANTABLEis either ‘YES’ (Privilege was grantedWITH GRANT OPTION) or ‘NO’ (Privilege was not grantedWITH GRANT OPTION).
If you want to restrict your code to Core SQL, do not reference
INFORMATION_SCHEMA.USAGE_PRIVILEGES.
INFORMATION_SCHEMA.USER_DEFINED_TYPE_PRIVILEGES¶
This View has the following Columns:
| Name | Domain | Nullable? |
GRANTOR |
SQL_IDENTIFIER |
no |
GRANTEE |
SQL_IDENTIFIER |
no |
USER_DEFINED_TYPE_CATALOG |
SQL_IDENTIFIER |
no |
USER_DEFINED_TYPE_SCHEMA |
SQL_IDENTIFIER |
no |
USER_DEFINED_TYPE_NAME |
SQL_IDENTIFIER |
no |
PRIVILEGE_TYPE |
CHARACTER_DATA |
no |
IS_GRANTABLE |
CHARACTER_DATA |
no |
USER_DEFINED_TYPE_PRIVILEGES shows the TYPE USAGE Privileges on UDTs in
this Catalog, where the Privileges are either available to, or granted by, the
current user.
GRANTORshows the <AuthorizationID> of the user (or perhaps the Role) who granted the Privilege.GRANTEEshows the <AuthorizationID> of the user (or perhaps the Role) who may use the Privilege. By definition, ifGRANTORisn’tCURRENT_USER, thenGRANTEEis eitherCURRENT_USERor ‘PUBLIC’.USER_DEFINED_TYPE_CATALOG,USER_DEFINED_TYPE_SCHEMA,USER_DEFINED_TYPE_NAMEuniquely identify a UDT in this Catalog.PRIVILEGE_TYPEshows the Privilege granted: ‘TYPE USAGE’.IS_GRANTABLEis either ‘YES’ (Privilege was grantedWITH GRANT OPTION) or ‘NO’ (Privilege was not grantedWITH GRANT OPTION).
If you want to restrict your code to Core SQL, do not reference
INFORMATION_SCHEMA.USER_DEFINED_TYPE_PRIVILEGES.
INFORMATION_SCHEMA.USER_DEFINED_TYPES¶
This View has the following Columns:
| Name | Domain | Nullable? |
USER_DEFINED_TYPE_CATALOG |
SQL_IDENTIFIER |
no |
USER_DEFINED_TYPE_SCHEMA |
SQL_IDENTIFIER |
no |
USER_DEFINED_TYPE_NAME |
SQL_IDENTIFIER |
no |
CATEGORY |
CHARACTER_DATA |
no |
IS_INSTANTIABLE |
CHARACTER_DATA |
no |
IS_FINAL |
CHARACTER_DATA |
yes |
ORDERING_FORM |
CHARACTER_DATA |
yes |
ORDERING_CATEGORY |
CHARACTER_DATA |
yes |
ORDERING_ROUTINE_CATALOG |
SQL_IDENTIFIER |
yes |
ORDERING_ROUTINE_SCHEMA |
SQL_IDENTIFIER |
yes |
ORDERING_ROUTINE_NAME |
SQL_IDENTIFIER |
yes |
REFERENCE_TYPE |
CHARACTER_DATA |
yes |
USER_DEFINED_TYPES shows the UDTs in this Catalog that the current user has
Privileges on.
USER_DEFINED_TYPE_CATALOG,USER_DEFINED_TYPE_SCHEMA,USER_DEFINED_TYPE_NAMEuniquely identify a UDT in this Catalog that the current user has Privileges on.USER_DEFINED_TYPE_CATEGORYis: ‘USER-DEFINED TYPE’.USER_DEFINED_TYPE_ORDERis either: ‘ORDER FULL’ (two values of this UDT may be compared for equality or relative order) or ‘EQUALS ONLY’ (two values of this UDT may be compared only for equality).USER_DEFINED_TYPE_EQUALS_CATALOG,USER_DEFINED_TYPE_EQUALS_SCHEMA,USER_DEFINED_TYPE_EQUALS_NAMEuniquely identify the specific name of theEQUALSfunction for this UDT.USER_DEFINED_TYPE_RELATIVE_CATALOG,USER_DEFINED_TYPE_RELATIVE_SCHEMA,USER_DEFINED_TYPE_RELATIVE_NAMEuniquely identify the specific name of the RELATIVE function for this UDT.USER_DEFINED_TYPE_HASH_CATALOG,USER_DEFINED_TYPE_HASH_SCHEMA,USER_DEFINED_TYPE_HASH_NAMEuniquely identify the specific name of theHASHfunction for this UDT.
If you want to restrict your code to Core SQL, do not reference
INFORMATION_SCHEMA.USER_DEFINED_TYPES.
INFORMATION_SCHEMA.VIEWS¶
This View has the following Columns:
| Name | Domain | Nullable? |
TABLE_CATALOG |
SQL_IDENTIFIER |
no |
TABLE_SCHEMA |
SQL_IDENTIFIER |
no |
TABLE_NAME |
SQL_IDENTIFIER |
no |
VIEW_DEFINITION |
CHARACTER_DATA |
yes |
CHECK_OPTION |
CHARACTER_DATA |
no |
IS_UPDATABLE |
CHARACTER_DATA |
no |
VIEWS shows the Views in this Catalog that the current user has Privileges
on.
TABLE_CATALOG,TABLE_SCHEMA,TABLE_NAMEuniquely identify a View that the current user may use.VIEW_DEFINITIONshows the query specification that defines the View. If the expression was too big to be stored, or if the current user doesn’t ownTABLE_SCHEMA, thenVIEW_DEFINITIONisNULL.CHECK_OPTIONis either: ‘CASCADED’ (the View definition has aWITH CASCADED CHECK OPTIONclause), ‘LOCAL’ (the View definition has aWITH LOCAL CHECK OPTIONclause) or ‘NONE’ (the View definition has noCHECK OPTIONclause).IS_UPDATABLEis either: ‘YES’ (the View definition simply contains an updatable query specification) or ‘NO’ (the View definition simply contains a query specification that isn’t updatable). IfIS_UPDATABLEis ‘NO’, thenCHECK_OPTIONmust be ‘NONE’.
INFORMATION_SCHEMA.VIEW_COLUMN_USAGE¶
This View has the following Columns:
| Name | Domain | Nullable? |
VIEW_CATALOG |
SQL_IDENTIFIER |
no |
VIEW_SCHEMA |
SQL_IDENTIFIER |
no |
VIEW_NAME |
SQL_IDENTIFIER |
no |
TABLE_CATALOG |
SQL_IDENTIFIER |
no |
TABLE_SCHEMA |
SQL_IDENTIFIER |
no |
TABLE_NAME |
SQL_IDENTIFIER |
no |
COLUMN_NAME |
SQL_IDENTIFIER |
no |
VIEW_COLUMN_USAGE shows the Columns on which Views in this Catalog depend,
where the Views are owned by the current user.
VIEW_CATALOG,VIEW_SCHEMA,VIEW_NAMEuniquely identify a View- that is owned by the current user.
TABLE_CATALOG,TABLE_SCHEMA,TABLE_NAME,COLUMN_NAMEuniquely identify a Column which is (explicitly or implicitly) referred to in this View’s query specification.
If you want to restrict your code to Core SQL, do not reference
INFORMATION_SCHEMA.VIEW_COLUMN_USAGE.
INFORMATION_SCHEMA.VIEW_TABLE_USAGE¶
This View has the following Columns:
| Name | Domain | Nullable? |
VIEW_CATALOG |
SQL_IDENTIFIER |
no |
VIEW_SCHEMA |
SQL_IDENTIFIER |
no |
VIEW_NAME |
SQL_IDENTIFIER |
no |
TABLE_CATALOG |
SQL_IDENTIFIER |
no |
TABLE_SCHEMA |
SQL_IDENTIFIER |
no |
TABLE_NAME |
SQL_IDENTIFIER |
no |
VIEW_TABLE_USAGE shows the Tables on which Views in this Catalog depend,
where the Views are owned by the current user.
VIEW_CATALOG,VIEW_SCHEMA,VIEW_NAMEuniquely identify a View that is owned by the current user.TABLE_CATALOG,TABLE_SCHEMA,TABLE_NAMEuniquely identify a Table which is referred to in this View’s query specification.
If you want to restrict your code to Core SQL, do not reference
INFORMATION_SCHEMA.VIEW_TABLE_USAGE.