METHOD:

 

 

 

 

 

 

 

 

 

 

 

 

DESCRIPTION:

 

 

 

 

Returns information about a database.

 

 

 

 

 

 

 

PROPERTY OF:

 

 

 

 

ADODatabase

 

 

 

 

 

 

 

 

SYNTAX:

 

 

 

 

<oRef>.getSchema([<schema expC>][<guid expC>][,<criteria expA>])

 

 

<oRef>

The database you want to get information about.

 

 

[<schema expC>]

The schema type name.

 

 

 

[<guid expC>]

The GUID of schema.

 

 

 

[,<criteria expA>]

Optional, the criteria for restriction columns.

 

 

 

 

 

 

DESCRIPTION:

 

 

 

 

The getSchema method returns self-descriptive information about the data source, such as what tables are in the data source, the columns in the tables, and the data types supported.

 

 

 

 

 

Criteria specifies an array that must occur in a corresponding subset of columns, called constraint columns.

 

 

 

 

 

 

Providers are not required to support all of the OLE DB standard schema queries.

 

 

 

 

 

 

 This method returns metadata an ADORowset object.

 

 

 

 

 

 

 

 

 

 

 

 

 

EXAMPLE:

 

 

 

 

 

 

 

 

oSchema = db.getSchema("TABLES")

 

 

 

oSchema = db.getSchema("TABLES", {null, null, "ORDERS"})

 

 

 

oSchema = db.getSchema("{C8B52229-5CF3-11CE-ADE5-00AA0044773D}", {null, null, "ORDERS"})

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Schema name:

DESCRIPTION:

Restriction columns:

Column names:

Data type:

DESCRIPTION:

 

TABLES

Returns the tables defined in the catalog that are accessible

[1] TABLE_CATALOG
[2] TABLE_SCHEMA
[3] TABLE_NAME
[4] TABLE_TYPE

TABLE_CATALOG

CHARACTER

Catalog name. NULL if the provider does not support catalogs.

 

TABLE_SCHEMA

CHARACTER

Unqualified schema name. NULL if the provider does not support schemas.

 

TABLE_NAME

CHARACTER

Table name. This column cannot contain NULL.

 

TABLE_TYPE

CHARACTER

Table type. One of the following or a provider-specific value: "ALIAS", "TABLE", "SYNONYM", "SYSTEM TABLE", "VIEW", "GLOBAL TEMPORARY", "LOCAL TEMPORARY", "SYSTEM VIEW"

 

TABLE_GUID

CHARACTER

GUID that uniquely identifies the table. Providers that do not use GUIDs to identify tables should return NULL in this column.

 

DESCRIPTION

CHARACTER

Human-readable description of the table. Null if there is no description associated with the column.

 

TABLE_PROPID

NUMERIC

Property ID of the table. Providers that do not use PROPIDs to identify columns should return NULL in this column.

 

DATE_CREATED

DATE

Date when the table was created or NULL if the provider does not have this information. Note that 1.x providers do not return this column.

 

DATE_MODIFIED

DATE

Date when the table definition was last modified or NULL if the provider does not have this information.

 

COLUMNS

Returns the columns of tables defined in the catalog

[1] TABLE_CATALOG
[2] TABLE_SCHEMA
[3] TABLE_NAME
[4] COLUMN_NAME

TABLE_CATALOG

CHARACTER

Catalog name. NULL if the provider does not support catalogs.

 

TABLE_SCHEMA

CHARACTER

Unqualified schema name. NULL if the provider does not support schemas.

 

TABLE_NAME

CHARACTER

Table name. This column cannot contain a NULL.

 

COLUMN_NAME

CHARACTER

The name of the column; this might not be unique. If this cannot be determined, a NULL is returned.

 

COLUMN_GUID

CHARACTER

Column GUID. Providers that do not use GUIDs to identify columns should return NULL in this column.

 

COLUMN_PROPID

NUMERIC

Column property ID. Providers that do not associate PROPIDs with columns should return NULL in this column.

 

ORDINAL_POSITION

NUMERIC

The ordinal of the column. Columns are numbered starting from one. NULL if there is no stable ordinal value for the column.

 

COLUMN_HASDEFAULT

LOGICAL

VARIANT_TRUE — The column has a default value.

 

COLUMN_DEFAULT

CHARACTER

Default value of the column. A provider may expose DBCOLUMN_DEFAULTVALUE but not DBCOLUMN_HASDEFAULT (for SQL-92 tables)

 

COLUMN_FLAGS

NUMERIC

A bitmask that describes column characteristics. The DBCOLUMNFLAGS enumerated type specifies the bits in the bitmask. 

 

IS_NULLABLE

LOGICAL

VARIANT_TRUE — The column might be nullable.

 

DATA_TYPE

NUMERIC

The indicator of the column's data type. If the data type of the column varies from row to row, this must be DBTYPE_VARIANT. This column cannot contain NULL. 

 

TYPE_GUID

CHARACTER

The GUID of the column's data type. Providers that do not use GUIDs to identify data types should return NULL in this column.

 

CHARACTER_MAXIMUM_LENGTH

NUMERIC

The maximum possible length of a value in the column. For character, binary, or bit columns, this is one of the following:

 

CHARACTER_OCTET_LENGTH

NUMERIC

Maximum length in octets (bytes) of the column, if the type of the column is character or binary. A value of zero means the column has no maximum length. NULL for all other types of columns.

 

NUMERIC_PRECISION

NUMERIC

If the column's data type is of a numeric data type other than VARNUMERIC, this is the maximum precision of the column. 

 

NUMERIC_SCALE

NUMERIC

If the column's type indicator is DBTYPE_DECIMAL, DBTYPE_NUMERIC, or DBTYPE_VARNUMERIC, this is the number of digits to the right of the decimal point. Otherwise, this is NULL.

 

DATETIME_PRECISION

NUMERIC

Datetime precision (number of digits in the fractional seconds portion) of the column if the column is a datetime or interval type. If the column's data type is not datetime, this is NULL.

 

CHARACTER_SET_CATALOG

CHARACTER

Catalog name in which the character set is defined. NULL if the provider does not support catalogs or different character sets.

 

CHARACTER_SET_SCHEMA

CHARACTER

Unqualified schema name in which the character set is defined. NULL if the provider does not support schemas or different character sets.

 

CHARACTER_SET_NAME

CHARACTER

Character set name. NULL if the provider does not support different character sets.

 

COLLATION_CATALOG

CHARACTER

Catalog name in which the collation is defined. NULL if the provider does not support catalogs or different collations.

 

COLLATION_SCHEMA

CHARACTER

Unqualified schema name in which the collation is defined. NULL if the provider does not support schemas or different collations.

 

COLLATION_NAME

CHARACTER

Collation name. NULL if the provider does not support different collations.

 

DOMAIN_CATALOG

CHARACTER

Catalog name in which the domain is defined. NULL if the provider does not support catalogs or domains.

 

DOMAIN_SCHEMA

CHARACTER

Unqualified schema name in which the domain is defined. NULL if the provider does not support schemas or domains.

 

DOMAIN_NAME

CHARACTER

Domain name. NULL if the provider does not support domains.

 

DESCRIPTION

CHARACTER

Human-readable description of the column. 

 

INDEXES

Returns the indexes defined in the catalog

[1] TABLE_CATALOG
[2] TABLE_SCHEMA
[3] INDEX_NAME
[4] TYPE
[5] TABLE_NAME

TABLE_CATALOG

CHARACTER

Catalog name. NULL if the provider does not support catalogs.

 

TABLE_SCHEMA

CHARACTER

Unqualified schema name. NULL if the provider does not support schemas.

 

TABLE_NAME

CHARACTER

Table name.

 

INDEX_CATALOG

CHARACTER

Catalog name. NULL if the provider does not support catalogs.

 

INDEX_SCHEMA

CHARACTER

Unqualified schema name. NULL if the provider does not support schemas.

 

INDEX_NAME

CHARACTER

Index name.

 

PRIMARY_KEY

LOGICAL

Whether the index represents the primary key on the table. NULL if this is not known.

 

UNIQUE

LOGICAL

Whether index keys must be unique. One of the following:

 

CLUSTERED

LOGICAL

Whether an index is clustered. One of the following:

 

TYPE

NUMERIC

The type of the index. One of the following:

 

FILL_FACTOR

NUMERIC

For a B+-tree index, this property represents the storage utilization factor of page nodes during the creation of the index. The value is an integer from 0 to 100 representing the percentage of use of an index node. For a linear hash index, this property represents the storage utilization of the entire hash structure (the ratio of used area to total allocated area) before a file structure expansion occurs.

 

INITIAL_SIZE

NUMERIC

The total amount of bytes allocated to this structure at creation time.

 

NULLS

NUMERIC

Whether null keys are allowed. One of the following:

 

SORT_BOOKMARKS

LOGICAL

How the index treats repeated keys. One of the following:

 

AUTO_UPDATE

LOGICAL

Whether the index is maintained automatically when changes are made to the corresponding base table. One of the following:

 

NULL_COLLATION

NUMERIC

How NULLs are collated in the index. One of the following:

 

ORDINAL_POSITION

NUMERIC

Ordinal position of the column in the index, starting with one.

 

COLUMN_NAME

CHARACTER

Column name. This column, together with the COLUMN_GUID and COLUMN_PROPID columns, forms the column ID. One or more of these columns will be NULL, depending on which elements of the DBID structure the provider uses.

 

COLUMN_GUID

CHARACTER

Column GUID.

 

COLUMN_PROPID

NUMERIC

Column property ID.

 

COLLATION

NUMERIC

One of the following:

 

CARDINALITY

NUMERIC

Number of unique values in the index.

 

PAGES

NUMERIC

Number of pages used to store the index.

 

FILTER_CONDITION

CHARACTER

The WHERE clause identifying the filtering restriction.

 

INTEGRATED

LOGICAL

Whether the index is integrated. That is, all base table columns are available from the index. One of the following:

 

PROCEDURES

Returns the procedures defined in the catalog

[1] PROCEDURE_CATALOG
[2] PROCEDURE_SCHEMA
[3] PROCEDURE_NAME
[4] PROCEDURE_TYPE

PROCEDURE_CATALOG

CHARACTER

Catalog name. NULL if the provider does not support catalogs.

 

PROCEDURE_SCHEMA

CHARACTER

Unqualified schema name. NULL if the provider does not support schemas.

 

PROCEDURE_NAME

CHARACTER

Procedure name.

 

PROCEDURE_TYPE

NUMERIC

DB_PT_UNKNOWN — It is not known whether there is a returned value. DB_PT_PROCEDURE — Procedure; there is no returned value. DB_PT_FUNCTION — Function; there is a returned value.

 

PROCEDURE_DEFINITION

CHARACTER

Procedure definition.

 

DESCRIPTION

CHARACTER

Human-readable description of the procedure.

 

DATE_CREATED

DATE

Date when the procedure was created or NULL if the provider does not have this information.

 

DATE_MODIFIED

DATE

Date when the procedure definition was last modified or NULL if the provider does not have this information.

 

ASSERTIONS

Returns the assertions defined in the catalog

[1] CONSTRAINT_CATALOG
[2] CONSTRAINT_SCHEMA
[3] CONSTRAINT_NAME

CONSTRAINT_CATALOG

CHARACTER

Catalog name. NULL if the provider does not support catalogs.

 

CONSTRAINT_SCHEMA

CHARACTER

Unqualified schema name. NULL if the provider does not support schemas.

 

CONSTRAINT_NAME

CHARACTER

Constraint name.

 

IS_DEFERRABLE

LOGICAL

The assertion is deferrable. 

 

INITIALLY_DEFERRED

LOGICAL

The assertion is initially deferred.

 

DESCRIPTION

CHARACTER

Human-readable description of the column.

 

CATALOGS

Returns the physical attributes associated with catalogs accessible from the DBMS

[1] CATALOG_NAME

CATALOG_NAME

CHARACTER

 

 

DESCRIPTION

CHARACTER

Human-readable description of the column.

 

CHARACTER_SETS

Returns the character sets defined in the catalog

[1] CHARACTER_SET_CATALOG
[2] CHARACTER_SET_SCHEMA
[3] CHARACTER_SET_NAME

CHARACTER_SET_CATALOG

CHARACTER

Catalog name. NULL if the provider does not support catalogs.

 

CHARACTER_SET_SCHEMA

CHARACTER

Unqualified schema name. NULL if the provider does not support schemas.

 

CHARACTER_SET_NAME

CHARACTER

Character set name.

 

FORM_OF_USE

CHARACTER

Name of form-of-use of the character set. 

 

NUMBER_OF_CHARACTERS

NUMERIC

Number of characters in the character repertoire. 

 

DEFAULT_COLLATE_CATALOG

CHARACTER

Catalog name containing the default collation. NULL if the provider does not support catalogs or different collations.

 

DEFAULT_COLLATE_SCHEMA

CHARACTER

Unqualified schema name containing the default collation. NULL if the provider does not support schemas or different collations.

 

DEFAULT_COLLATE_NAME

CHARACTER

Default collation. NULL if the provider does not support different collations.

 

COLLATIONS

Returns the character collations defined in the catalog

[1] COLLATION_CATALOG
[2] COLLATION_SCHEMA
[3] COLLATION_NAME

COLLATION_CATALOG

CHARACTER

Catalog name. NULL if the provider does not support catalogs. 

 

COLLATION_SCHEMA

CHARACTER

Unqualified schema name. NULL if the provider does not support schemas. 

 

COLLATION_NAME

CHARACTER

Collation name. 

 

CHARACTER_SET_CATALOG

CHARACTER

Catalog name containing the character set on which the collation is defined. NULL if the provider does not support catalogs or different character sets. 

 

CHARACTER_SET_SCHEMA

CHARACTER

Unqualified schema name containing the character set on which the collation is defined. NULL if the provider does not support schema or different character sets. 

 

CHARACTER_SET_NAME

CHARACTER

Character set name on which the collation is defined. NULL if the provider does not support different character sets.

 

PAD_ATTRIBUTE

CHARACTER

"NO PAD" — The collation being described has the NO PAD attribute. "PAD SPACE" — The collation being described has the PAD SPACE attribute.

 

CHECK_CONSTRAINTS

Returns the check constraints defined in the catalog

[1] CONSTRAINT_CATALOG
[2] CONSTRAINT_SCHEMA
[3] CONSTRAINT_NAME

CONSTRAINT_CATALOG

CHARACTER

Catalog name. NULL if the provider does not support catalogs.

 

CONSTRAINT_SCHEMA

CHARACTER

Unqualified schema name. NULL if the provider does not support schemas.

 

CONSTRAINT_NAME

CHARACTER

Constraint name.

 

CHECK_CLAUSE

CHARACTER

The WHERE clause specified in the CHECK clause.

 

DESCRIPTION

CHARACTER

Human-readable description of the column.

 

CONSTRAINT_COLUMN_USAGE

Returns the columns used by referential constraints, unique constraints, check constraints, and assertions, defined in the catalog

[1] TABLE_CATALOG
[2] TABLE_SCHEMA
[3] TABLE_NAME
[4] COLUMN_NAME
[5] CONSTRAINT_CATALOG
[6] CONSTRAINT_SCHEMA
[7] CONSTRAINT_NAME

TABLE_CATALOG

CHARACTER

Catalog name in which the table is defined. NULL if the provider does not support catalogs.

 

TABLE_SCHEMA

CHARACTER

Unqualified schema name in which the table is defined. NULL if the provider does not support schemas.

 

TABLE_NAME

CHARACTER

Table name.

 

COLUMN_NAME

CHARACTER

Column name. This column, together with the COLUMN_GUID and COLUMN_PROPID columns, forms the column ID. One or more of these columns will be NULL, depending on which elements of the DBID structure the provider uses.

 

COLUMN_GUID

CHARACTER

Column GUID.

 

COLUMN_PROPID

NUMERIC

Column property ID.

 

CONSTRAINT_CATALOG

CHARACTER

Catalog name. NULL if the provider does not support catalogs.

 

CONSTRAINT_SCHEMA

CHARACTER

Unqualified schema name. NULL if the provider does not support schemas.

 

CONSTRAINT_NAME

CHARACTER

Constraint name.

 

CONSTRAINT_TABLE_USAGE

Returns the tables that are used by referential constraints, unique constraints, check constraints, and assertions defined in the catalog

[1] TABLE_CATALOG
[2] TABLE_SCHEMA
[3] TABLE_NAME
[4] CONSTRAINT_CATALOG
[5] CONSTRAINT_SCHEMA
[6] CONSTRAINT_NAME

TABLE_CATALOG

CHARACTER

Catalog name in which the table is defined. NULL if the provider does not support catalogs.

 

TABLE_SCHEMA

CHARACTER

Unqualified schema name in which the table is defined. NULL if the provider does not support schemas.

 

TABLE_NAME

CHARACTER

Table name.

 

CONSTRAINT_CATALOG

CHARACTER

Catalog name. NULL if the provider does not support catalogs.

 

CONSTRAINT_SCHEMA

CHARACTER

Unqualified schema name. NULL if the provider does not support schemas.

 

CONSTRAINT_NAME

CHARACTER

Constraint name.

 

KEY_COLUMN_USAGE

Returns the columns defined in the catalog that are constrained as keys

[1] CONSTRAINT_CATALOG
[2] CONSTRAINT_SCHEMA
[3] CONSTRAINT_NAME
[4] TABLE_CATALOG
[5] TABLE_SCHEMA
[6] TABLE_NAME
[7] COLUMN_NAME

CONSTRAINT_CATALOG

CHARACTER

Catalog name. NULL if the provider does not support catalogs.

 

CONSTRAINT_SCHEMA

CHARACTER

Unqualified schema name. NULL if the provider does not support schemas.

 

CONSTRAINT_NAME

CHARACTER

Constraint name.

 

TABLE_CATALOG

CHARACTER

Catalog name in which the table containing the key column is defined. NULL if the provider does not support catalogs.

 

TABLE_SCHEMA

CHARACTER

Unqualified schema name in which the table containing the key column is defined. NULL if the provider does not support schemas.

 

TABLE_NAME

CHARACTER

Table name containing the key column.

 

COLUMN_NAME

CHARACTER

Name of the column participating in the unique, primary, or foreign key. This column, together with the COLUMN_GUID and COLUMN_PROPID columns, forms the column ID. One or more of these columns will be NULL, depending on which elements of the DBID structure the provider uses.

 

COLUMN_GUID

CHARACTER

Column GUID.

 

COLUMN_PROPID

NUMERIC

Column property ID.

 

ORDINAL_POSITION

NUMERIC

Ordinal position of the column in the constraint being described. If the constraint being described is a key of cardinality one, the value of ORDINAL_POSITION is always one.

 

REFERENTIAL_CONSTRAINTS

Returns the referential constraints defined in the catalog

[1] CONSTRAINT_CATALOG
[2] CONSTRAINT_SCHEMA
[3] CONSTRAINT_NAME

CONSTRAINT_CATALOG

CHARACTER

Catalog name. NULL if the provider does not support catalogs.

 

CONSTRAINT_SCHEMA

CHARACTER

Unqualified schema name. NULL if the provider does not support schemas.

 

CONSTRAINT_NAME

CHARACTER

Constraint name.

 

UNIQUE_CONSTRAINT_CATALOG

CHARACTER

Catalog name in which the unique or primary key constraint is defined. NULL if the provider does not support catalogs.

 

UNIQUE_CONSTRAINT_SCHEMA

CHARACTER

Unqualified schema name in which the unique or primary key constraint is defined. NULL if the provider does not support schemas.

 

UNIQUE_CONSTRAINT_NAME

CHARACTER

Unique or primary key constraint name.

 

MATCH_OPTION

CHARACTER

"NONE", "PARTIAL", "FULL"

 

UPDATE_RULE

CHARACTER

"CASCADE", "SET NULL", "SET DEFAULT", "NO ACTION"

 

DELETE_RULE

CHARACTER

"CASCADE", "SET NULL", "SET DEFAULT", "NO ACTION"

 

DESCRIPTION

CHARACTER

Human-readable description of the constraint.

 

TABLE_CONSTRAINTS

Returns the table constraints defined in the catalog

[1] CONSTRAINT_CATALOG
[2] CONSTRAINT_SCHEMA
[3] CONSTRAINT_NAME
[4] TABLE_CATALOG
[5] TABLE_SCHEMA
[6] TABLE_NAME
[7] CONSTRAINT_TYPE

CONSTRAINT_CATALOG

CHARACTER

Catalog name. NULL if the provider does not support catalogs.

 

CONSTRAINT_SCHEMA

CHARACTER

Unqualified schema name. NULL if the provider does not support schemas.

 

CONSTRAINT_NAME

CHARACTER

Constraint name.

 

TABLE_CATALOG

CHARACTER

Catalog name in which the table is defined. NULL if the provider does not support catalogs.

 

TABLE_SCHEMA

CHARACTER

Unqualified schema name in which the table is defined. NULL if the provider does not support schemas.

 

TABLE_NAME

CHARACTER

Table name.

 

CONSTRAINT_TYPE

CHARACTER

Constraint type. One of the following: "UNIQUE", "PRIMARY KEY", "FOREIGN KEY", "CHECK"

 

IS_DEFERRABLE

LOGICAL

The table constraint is deferrable.

 

INITIALLY_DEFERRED

LOGICAL

The table constraint is initially deferred.

 

DESCRIPTION

CHARACTER

Human-readable description of the column

 

COLUMNS_DOMAIN_USAGE

Returns the columns defined in the catalog that are dependent on a domain defined in the catalog

[1] DOMAIN_CATALOG
[2] DOMAIN_SCHEMA
[3] DOMAIN_NAME
[4] COLUMN_NAME

DOMAIN_CATALOG

CHARACTER

Catalog name. NULL if the provider does not support catalogs.

 

DOMAIN_SCHEMA

CHARACTER

Unqualified schema name. NULL if the provider does not support schemas.

 

DOMAIN_NAME

CHARACTER

View name.

 

TABLE_CATALOG

CHARACTER

Catalog name in which the table is defined. NULL if the provider does not support catalogs.

 

TABLE_SCHEMA

CHARACTER

Unqualified schema name in which the table is defined. NULL if the provider does not support schemas.

 

TABLE_NAME

CHARACTER

Table name.

 

COLUMN_NAME

CHARACTER

Column name. This column, together with the COLUMN_GUID and COLUMN_PROPID columns, forms the column ID. One or more of these columns will be NULL, depending on which elements of the DBID structure the provider uses.

 

COLUMN_GUID

CHARACTER

Column GUID.

 

COLUMN_PROPID

NUMERIC

Column property ID.

 

COLUMN_PRIVILEGES

Returns the privileges on columns of tables defined in the catalog

[1] TABLE_CATALOG
[2] TABLE_SCHEMA
[3] TABLE_NAME
[4] COLUMN_NAME
[5] GRANTOR
[6] GRANTEE

GRANTOR

CHARACTER

User who granted the privileges on the table in TABLE_NAME.

 

GRANTEE

CHARACTER

User name (or "PUBLIC") to whom the privilege has been granted.

 

TABLE_CATALOG

CHARACTER

Catalog name in which the table is defined. NULL if the provider does not support catalogs.

 

TABLE_SCHEMA

CHARACTER

Unqualified schema name in which the table is defined. NULL if the provider does not support schemas.

 

TABLE_NAME

CHARACTER

Table name.

 

COLUMN_NAME

CHARACTER

Column name. This column, together with the COLUMN_GUID and COLUMN_PROPID columns, forms the column ID. One or more of these columns will be NULL, depending on which elements of the DBID structure the provider uses.

 

COLUMN_GUID

CHARACTER

Column GUID.

 

COLUMN_PROPID

NUMERIC

Column property ID.

 

PRIVILEGE_TYPE

CHARACTER

Privilege type. One of the following: "SELECT", "DELETE", "INSERT", "UPDATE", "REFERENCES"

 

IS_GRANTABLE

LOGICAL

The privilege being described was granted with the WITH GRANT OPTION clause.

 

TABLE_PRIVILEGES

Returns the privileges on tables defined in the catalog

[1] TABLE_CATALOG
[2] TABLE_SCHEMA
[3] TABLE_NAME
[4] GRANTOR
[5] GRANTEE

GRANTOR

CHARACTER

User who granted the privileges on the table in TABLE_NAME.

 

GRANTEE

CHARACTER

User name (or "PUBLIC") to whom the privilege has been granted.

 

TABLE_CATALOG

CHARACTER

Catalog name in which the table is defined. NULL if the provider does not support catalogs.

 

TABLE_SCHEMA

CHARACTER

Unqualified schema name in which the table is defined. NULL if the provider does not support schemas.

 

TABLE_NAME

CHARACTER

Table name.

 

PRIVILEGE_TYPE

CHARACTER

Privilege type. One of the following: "SELECT", "DELETE", "INSERT", "UPDATE", "REFERENCES"

 

IS_GRANTABLE

LOGICAL

The privilege being described was granted with the WITH GRANT OPTION clause.

 

USAGE_PRIVILEGES

Returns the USAGE privileges on objects defined in the catalog

[1] OBJECT_CATALOG
[2] OBJECT_SCHEMA
[3] OBJECT_NAME
[4] OBJECT_TYPE
[5] GRANTOR
[6] GRANTEE

GRANTOR

CHARACTER

User who granted the privileges on the object in OBJECT_NAME.

 

GRANTEE

CHARACTER

User name (or "PUBLIC") to whom the privilege has been granted.

 

OBJECT_CATALOG

CHARACTER

Catalog name in which the object is defined. NULL if the provider does not support catalogs.

 

OBJECT_SCHEMA

CHARACTER

Unqualified schema name in which the object is defined. NULL if the provider does not support schemas.

 

OBJECT_NAME

CHARACTER

Object name.

 

OBJECT_TYPE

CHARACTER

Object type. One of the following: "DOMAIN", "CHARACTER SET", "COLLATION", "TRANSLATION"

 

PRIVILEGE_TYPE

CHARACTER

Privilege type. One of the following: "USAGE"

 

IS_GRANTABLE

LOGICAL

The privilege being described was granted with the WITH GRANT OPTION clause.

 

SCHEMATA

Returns the schemas (database objects)

[1] CATALOG_NAME
[2] SCHEMA_NAME
[3] SCHEMA_OWNER

CATALOG_NAME

CHARACTER

Catalog name. NULL if the provider does not support catalogs.

 

SCHEMA_NAME

CHARACTER

Unqualified schema name.

 

SCHEMA_OWNER

CHARACTER

User that owns the schemas.

 

DEFAULT_CHARACTER_SET_CATALOG

CHARACTER

Catalog name of the default character set for columns and domains in the schemas. NULL if the provider does not support catalogs or different character sets.

 

DEFAULT_CHARACTER_SET_SCHEMA

CHARACTER

Unqualified schema name of the default character set for columns and domains in the schemas. NULL if the provider does not support different character sets.

 

DEFAULT_CHARACTER_SET_NAME

CHARACTER

Default character set name. NULL if the provider does not support different character sets.

 

SQL_LANGUAGES

Returns the conformance levels, options, and dialects supported by the SQL-implementation processing data defined in the catalog.

None

SQL_LANGUAGE_SOURCE

CHARACTER

Should be "ISO 9075" for standard SQL.

 

SQL_LANGUAGE_YEAR

CHARACTER

Should be "1992" for ANSI SQL-92–compliant SQL.

 

SQL_LANGUAGE_CONFORMANCE

CHARACTER

One of the following: "ENTRY", "INTERMEDIATE", "FULL"

 

SQL_LANGUAGE_INTEGRITY

CHARACTER

"YES" — Optional integrity feature is supported. "NO" — Optional integrity feature is not supported.

 

SQL_LANGUAGE_IMPLEMENTATION

CHARACTER

NULL for "ISO 9075" implementation.

 

SQL_LANGUAGE_BINDING_STYLE

CHARACTER

"DIRECT" for C/C++ callable direct execution of SQL.

 

SQL_LANGUAGE_PROGRAMMING_LANGUAGE

CHARACTER

NULL.

 

STATISTICS

Returns the statistics defined in the catalog

[1] TABLE_CATALOG
[2] TABLE_SCHEMA
[3] TABLE_NAME

TABLE_CATALOG

CHARACTER

Catalog name. NULL if the provider does not support catalogs.

 

TABLE_SCHEMA

CHARACTER

Unqualified schema name. NULL if the provider does not support schemas.

 

TABLE_NAME

CHARACTER

Table name.

 

CARDINALITY

NUMERIC

Cardinality (number of rows) of the table.

 

TRANSLATIONS

Returns the character translations defined in the catalog that are accessible

[1] TRANSLATION_CATALOG
[2] TRANSLATION_SCHEMA
[3] TRANSLATION_NAME

TRANSLATION_CATALOG

CHARACTER

Catalog name. NULL if the provider does not support catalogs.

 

TRANSLATION_SCHEMA

CHARACTER

Unqualified schema name. NULL if the provider does not support schemas.

 

TRANSLATION_NAME

CHARACTER

Translation name.

 

SOURCE_CHARACTER_SET_CATALOG

CHARACTER

Catalog name containing the source character set on which the translation is defined. NULL if the provider does not support catalogs.

 

SOURCE_CHARACTER_SET_SCHEMA

CHARACTER

Unqualified schema name containing the source character set on which the translation is defined. NULL if the provider does not support schemas.

 

SOURCE_CHARACTER_SET_NAME

CHARACTER

Source character set name on which the translation is defined.

 

TARGET_CHARACTER_SET_CATALOG

CHARACTER

Catalog name containing the target character set on which the translation is defined. NULL if the provider does not support catalogs.

 

TARGET_CHARACTER_SET_SCHEMA

CHARACTER

Unqualified schema name containing the target character set on which the translation is defined. NULL if the provider does not support schemas.

 

TARGET_CHARACTER_SET_NAME

CHARACTER

Target character set name on which the translation is defined.

 

PROVIDER_TYPES

Returns the data types supported by the data provider

[1] DATA_TYPE
[2] BEST_MATCH

TYPE_NAME

CHARACTER

Provider-specific data type name.

 

DATA_TYPE

NUMERIC

The indicator of the data type.

 

COLUMN_SIZE

NUMERIC

The length of a non-numeric column or parameter refers to either the maximum or the length defined for this type by the provider. For character data, this is the maximum or defined length in characters. For datetime data types, this is the length of the string representation (assuming the maximum allowed precision of the fractional seconds component).

 

LITERAL_PREFIX

CHARACTER

Character or characters used to prefix a literal of this type in a text command.

 

LITERAL_SUFFIX

CHARACTER

Character or characters used to suffix a literal of this type in a text command.

 

CREATE_PARAMS

CHARACTER

The creation parameters are specified by the consumer when creating a column of this data type. 

 

IS_NULLABLE

LOGICAL

The data type is nullable. NULL — It is not known whether the data type is nullable.

 

CASE_SENSITIVE

LOGICAL

The data type is a character type and is case-sensitive.

 

SEARCHABLE

NUMERIC

One of the following: DB_UNSEARCHABLE DB_LIKE_ONLY, DB_ALL_EXCEPT_LIKE, DB_SEARCHABLE 

 

UNSIGNED_ATTRIBUTE

LOGICAL

The data type is unsigned.

 

FIXED_PREC_SCALE

LOGICAL

The data type has a fixed precision and scale.

 

AUTO_UNIQUE_VALUE

LOGICAL

Values of this type can be autoincrementing.

 

LOCAL_TYPE_NAME

CHARACTER

Localized version of TYPE_NAME. NULL is returned if a localized name is not supported by the data provider.

 

MINIMUM_SCALE

NUMERIC

If the type indicator is DBTYPE_VARNUMERIC, DBTYPE_DECIMAL, or DBTYPE_NUMERIC, this is the minimum number of digits allowed to the right of the decimal point. Otherwise, this is NULL.

 

MAXIMUM_SCALE

NUMERIC

If the type indicator is DBTYPE_VARNUMERIC, DBTYPE_DECIMAL, or DBTYPE_NUMERIC, this is the maximum number of digits allowed to the right of the decimal point. Otherwise, this is NULL.

 

GUID

CHARACTER

Intended for future use. The GUID of the type, if the type is described in a type library. Otherwise NULL.

 

TYPELIB

CHARACTER

Intended for future use. The type library containing the description of the type, if the type is described in a type library. Otherwise NULL.

 

VERSION

CHARACTER

Intended for future use. The version of the type definition. Providers might want to version type definitions. Different providers might use different versioning schemes, such as a timestamp or number (integer or float). NULL if not supported.

 

IS_LONG

LOGICAL

The data type is a BLOB that contains very long data; the definition of very long data is provider-specific.

 

BEST_MATCH

LOGICAL

The data type is the best match between all data types in the data store and the OLE DB data type indicated by the value in the DATA_TYPE column.

 

IS_FIXEDLENGTH

LOGICAL

Columns of this type created by the data definition language (DDL) will be of fixed length.

 

VIEWS

Returns the views defined in the catalog that are accessible

[1] TABLE_CATALOG
[2] TABLE_SCHEMA
[3] TABLE_NAME

TABLE_CATALOG

CHARACTER

Catalog name. NULL if the provider does not support catalogs.

 

TABLE_SCHEMA

CHARACTER

Unqualified schema name. NULL if the provider does not support schemas.

 

TABLE_NAME

CHARACTER

View name.

 

VIEW_DEFINITION

CHARACTER

View definition. This is a query expression.

 

CHECK_OPTION

LOGICAL

Check option. One of the following: Cascaded update checking (same as no CHECK OPTION specified on view definition).

 

IS_UPDATABLE

LOGICAL

The view is updatable.

 

DESCRIPTION

CHARACTER

Human-readable description of the view.

 

DATE_CREATED

DATE

Date when the view was created or NULL if the provider does not have this information.

 

DATE_MODIFIED

DATE

Date when the view definition was last modified or NULL if the provider does not have this information.

 

VIEW_COLUMN_USAGE

Returns the columns on which viewed tables, are dependent

[1] VIEW_CATALOG
[2] VIEW_SCHEMA
[3] VIEW_NAME

VIEW_CATALOG

CHARACTER

Catalog name. NULL if the provider does not support catalogs.

 

VIEW_SCHEMA

CHARACTER

Unqualified schema name. NULL if the provider does not support schemas.

 

VIEW_NAME

CHARACTER

View name.

 

TABLE_CATALOG

CHARACTER

Catalog name in which the table is defined. NULL if the provider does not support catalogs.

 

TABLE_SCHEMA

CHARACTER

Unqualified schema name in which the table is defined. NULL if the provider does not support schemas.

 

TABLE_NAME

CHARACTER

Table name.

 

COLUMN_NAME

CHARACTER

Column name. This column, together with the COLUMN_GUID and COLUMN_PROPID columns, forms the column ID. One or more of these columns will be NULL, depending on which elements of the DBID structure the provider uses.

 

COLUMN_GUID

CHARACTER

Column GUID.

 

COLUMN_PROPID

NUMERIC

Column property ID.

 

VIEW_TABLE_USAGE

Returns the tables on which viewed tables, are dependent

[1] VIEW_CATALOG
[2] VIEW_SCHEMA
[3] VIEW_NAME

VIEW_CATALOG

CHARACTER

Catalog name. NULL if the provider does not support catalogs.

 

VIEW_SCHEMA

CHARACTER

Unqualified schema name. NULL if the provider does not support schemas.

 

VIEW_NAME

CHARACTER

View name.

 

TABLE_CATALOG

CHARACTER

Catalog name in which the table is defined. NULL if the provider does not support catalogs.

 

TABLE_SCHEMA

CHARACTER

Unqualified schema name in which the table is defined. NULL if the provider does not support schemas.

 

TABLE_NAME

CHARACTER

Table name.

 

PROCEDURE_PARAMETERS

Returns info about the parameters and return codes of procedures

[1] PROCEDURE_CATALOG
[2] PROCEDURE_SCHEMA
[3] PROCEDURE_NAME
[4] PARAMETER_NAME

PROCEDURE_CATALOG

CHARACTER

Catalog name. NULL if the provider does not support catalogs.

 

PROCEDURE_SCHEMA

CHARACTER

Schema name. NULL if the provider does not support catalogs.

 

PROCEDURE_NAME

CHARACTER

Procedure name.

 

PARAMETER_NAME

CHARACTER

Parameter name. NULL if the parameter is not named.

 

ORDINAL_POSITION

NUMERIC

If the parameter is an input, input/output, or output parameter, this is the one-based ordinal position of the parameter in the procedure call.

 

PARAMETER_TYPE

NUMERIC

One of the following: DBPARAMTYPE_INPUT, DBPARAMTYPE_INPUTOUTPUT, DBPARAMTYPE_OUTPUT, DBPARAMTYPE_RETURNVALUE

 

PARAMETER_HASDEFAULT

LOGICAL

The parameter has a default value.

 

PARAMETER_DEFAULT

CHARACTER

Default value of parameter.

 

IS_NULLABLE

LOGICAL

The parameter might be nullable.

 

DATA_TYPE

NUMERIC

The indicator of the parameter's data type. For a list of valid type indicators, see "Type Indicators" in Appendix A.

 

CHARACTER_MAXIMUM_LENGTH

NUMERIC

The maximum possible length of a value in the parameter. For character, binary, or bit parameters, this is one of the following:

 

CHARACTER_OCTET_LENGTH

NUMERIC

Maximum length in octets (bytes) of the parameter, if the type of the parameter is character or binary. A value of zero means the parameter has no maximum length. NULL for all other types of parameters.

 

NUMERIC_PRECISION

NUMERIC

If the parameter's data type is of a numeric data type other than VARNUMERIC, this is the maximum precision of the parameter. The precision of parameters with a data type of DBTYPE_DECIMAL or DBTYPE_NUMERIC depends on the definition of the parameters. For the precision of all other numeric data types, see "Precision of Numeric Data Types" in Appendix A.

 

NUMERIC_SCALE

NUMERIC

If the column's type indicator is DBTYPE_DECIMAL, DBTYPE_NUMERIC, or DBTYPE_VARNUMERIC, this is the number of digits to the right of the decimal point. Otherwise, this is NULL.

 

DESCRIPTION

CHARACTER

Human-readable description of the parameter. For example, the description of a parameter named Name in a procedure that adds a new employee might be "Employee name."

 

TYPE_NAME

CHARACTER

Provider-specific data type name. This column is not returned by 1.x providers.

 

LOCAL_TYPE_NAME

CHARACTER

Localized version of TYPE_NAME. NULL is returned if a localized name is not supported by the data provider. This column is not returned by 1.x providers.

 

FOREIGN_KEYS

Returns the foreign key columns defined in the catalog

[1] PK_TABLE_CATALOG
[2] PK_TABLE_SCHEMA
[3] PK_TABLE_NAME
[4] FK_TABLE_CATALOG
[5] FK_TABLE_SCHEMA
[6] FK_TABLE_NAME

PK_TABLE_CATALOG

CHARACTER

Catalog name in which the primary key table is defined. NULL if the provider does not support catalogs.

 

PK_TABLE_SCHEMA

CHARACTER

Unqualified schema name in which the primary key table is defined. NULL if the provider does not support schemas.

 

PK_TABLE_NAME

CHARACTER

Primary key table name.

 

PK_COLUMN_NAME

CHARACTER

Primary key column name. This column, together with the PK_COLUMN_GUID and PK_COLUMN_PROPID columns, forms the column ID. One or more of these columns will be NULL, depending on which elements of the DBID structure the provider uses.

 

PK_COLUMN_GUID

CHARACTER

Primary key column GUID.

 

PK_COLUMN_PROPID

NUMERIC

Primary key column property ID.

 

FK_TABLE_CATALOG

CHARACTER

Catalog name in which the foreign key table is defined. NULL if the provider does not support catalogs.

 

FK_TABLE_SCHEMA

CHARACTER

Unqualified schema name in which the foreign key table is defined. NULL if the provider does not support schemas.

 

FK_TABLE_NAME

CHARACTER

Foreign key table name.

 

FK_COLUMN_NAME

CHARACTER

Foreign key column name. This column, together with the FK_COLUMN_GUID and FK_COLUMN_PROPID columns, forms the column ID. One or more of these columns will be NULL, depending on which elements of the DBID structure the provider uses.

 

FK_COLUMN_GUID

CHARACTER

Foreign key column GUID.

 

FK_COLUMN_PROPID

NUMERIC

Foreign key column property ID.

 

ORDINAL

NUMERIC

The order of the column names (and GUIDs and property IDs) in the key. For example, a table might contain several foreign key references to another table. The ordinal starts over for each reference; for example, two references to a three-column key would return 1, 2, 3, 1, 2, 3.

 

UPDATE_RULE

CHARACTER

If an <update rule> was specified, then the UPDATE_RULE value is one of the following: "CASCADE" — "SET NULL" "SET DEFAULT" — "NO ACTION" 

 

DELETE_RULE

CHARACTER

If a <delete rule> was specified, the DELETE_RULE value is one of the following: "CASCADE" — "SET NULL" "SET DEFAULT" — "NO ACTION" 

 

PK_NAME

CHARACTER

Primary key name. NULL if the provider does not support named primary key constraints. This column is not returned by 1.x providers.

 

FK_NAME

CHARACTER

Foreign key name. NULL if the provider does not support named foreign key constraints. This column is not returned by 1.x providers.

 

DEFERRABILITY

NUMERIC

Deferrability of the foreign key. Value is one of the following: DBPROPVAL_DF_INITIALLY_DEFERRED, DBPROPVAL_DF_INITIALLY_IMMEDIATE, DBPROPVAL_DF_NOT_DEFERRABLE

 

PRIMARY_KEYS

Returns the primary key columns defined in the catalog

[1] TABLE_CATALOG
[2] TABLE_SCHEMA
[3] TABLE_NAME

TABLE_CATALOG

CHARACTER

Catalog name in which the table is defined. NULL if the provider does not support catalogs.

 

TABLE_SCHEMA

CHARACTER

Unqualified schema name in which the table is defined. NULL if the provider does not support schemas.

 

TABLE_NAME

CHARACTER

Table name.

 

COLUMN_NAME

CHARACTER

Primary key column name. This column, together with the COLUMN_GUID and COLUMN_PROPID columns, forms the column ID. One or more of these columns will be NULL, depending on which elements of the DBID structure the provider uses.

 

COLUMN_GUID

CHARACTER

Primary key column GUID.

 

COLUMN_PROPID

NUMERIC

Primary key column property ID.

 

ORDINAL

NUMERIC

The order of the column names (and GUIDs and property IDs) in the key.

 

PK_NAME

CHARACTER

Primary key name. NULL if the provider does not support primary key constraints. This column is not returned by 1.x providers.

 

PROCEDURE_COLUMNS

Returns info about the columns of rowsets returned by procedures

[1] PROCEDURE_CATALOG
[2] PROCEDURE_SCHEMA
[3] PROCEDURE_NAME
[4] COLUMN_NAME

PROCEDURE_CATALOG

CHARACTER

Catalog name. NULL if the provider does not support catalogs.

 

PROCEDURE_SCHEMA

CHARACTER

Unqualified schema name. NULL if the provider does not support schemas.

 

PROCEDURE_NAME

CHARACTER

Table name.

 

COLUMN_NAME

CHARACTER

The name of the column; this might not be unique. If this cannot be determined, a NULL is returned.

 

COLUMN_GUID

CHARACTER

Column GUID.

 

COLUMN_PROPID

NUMERIC

Column property ID.

 

ROWSET_NUMBER

NUMERIC

Number of the rowset containing the column. This is greater than one only if the procedure returns multiple rowsets.

 

ORDINAL_POSITION

NUMERIC

The ordinal of the column. Columns are numbered starting from one. NULL if there is no stable ordinal value for the column.

 

IS_NULLABLE

LOGICAL

The column might be nullable.

 

DATA_TYPE

NUMERIC

The indicator of the column's data type. If the data type of the column varies from row to row, this must be DBTYPE_VARIANT. For a list of valid type indicators, see "Type Indicators" in Appendix A.

 

TYPE_GUID

CHARACTER

The GUID of the column's data type.

 

CHARACTER_MAXIMUM_LENGTH

NUMERIC

The maximum possible length of a value in the column. For character, binary, or bit columns, this is one of the following:

 

CHARACTER_OCTET_LENGTH

NUMERIC

Maximum length in octets (bytes) of the column, if the type of the column is character or binary. A value of zero means the column has no maximum length. NULL for all other types of columns.

 

NUMERIC_PRECISION

NUMERIC

If the column's data type is of a numeric data type other than VARNUMERIC, this is the maximum precision of the column. The precision of columns with a data type of DBTYPE_DECIMAL or DBTYPE_NUMERIC depends on the definition of the column. For the precision of all other numeric data types, see "Precision of Numeric Data Types" in Appendix A.

 

NUMERIC_SCALE

NUMERIC

If the column's type indicator is DBTYPE_DECIMAL, DBTYPE_NUMERIC, or DBTYPE_VARNUMERIC, this is the number of digits to the right of the decimal point. Otherwise, this is NULL.

 

DESCRIPTION

CHARACTER

Human-readable description of the column. For example, the description for a column named Name in the Employee table might be "Employee name."

 

KEYWORDS

Returns a list of provider-specific keywords

None

KEYWORD

CHARACTER

Keyword

 

LITERALS

Returns a list of provider-specific literals used in text commands

None

LITERALNAME

CHARACTER

Literal name.

 

 

LITERALVALUE

CHARACTER

Literal value. NULL if is not used.

 

 

INVALIDCHARS

CHARACTER

The characters that are not valid in the literal. NULL if is not used.

 

 

INVALIDSTARTINGCHARS

CHARACTER

The characters that are not valid as the first character of the literal. NULL if the literal can start with any valid character or is not used.

 

 

LITERAL

NUMERIC

Literal ID.

 

 

SUPPORTED

LOGICAL

When the provider supports the valid literal ID.

 

 

MAXLEN

NUMERIC

The max number of characters in the literal. 0 if there is no max or the max is unknown.