DB2 Version 9.7 for Linux, UNIX, and Windows

SQLGetInfo function (CLI) - Get general information

Returns general information about the DBMS that the application is currently connected to.

Purpose

Specification: CLI 1.1 ODBC 1.0 ISO CLI

The SQLGetInfo() function returns general information about the database management system (DBMS) that the application is currently connected to.

Unicode equivalent: You can also use this function with the Unicode character set. The corresponding Unicode function is SQLGetInfoW(). See Unicode functions (CLI) for information about ANSI to Unicode function mappings.

Syntax

SQLRETURN   SQLGetInfo       (
               SQLHDBC           ConnectionHandle,   /* hdbc */
               SQLUSMALLINT      InfoType,           /* fInfoType */
               SQLPOINTER        InfoValuePtr,       /* rgbInfoValue */
               SQLSMALLINT       BufferLength,       /* cbInfoValueMax */
               SQLSMALLINT       *StringLengthPtr);  /* pcbInfoValue */

Function arguments

Table 1. SQLGetInfo arguments
Data type Argument Use Description
SQLHDBC ConnectionHandle Input The database connection handle.
SQLUSMALLINT InfoType Input The type of information that is required. The possible values for this argument are described in Information returned by SQLGetInfo().
SQLPOINTER InfoValuePtr Output and input Pointer to buffer where this function stores the information that you want. Depending on the type of information that is being retrieved, 5 types of information can be returned:
  • 16-bit integer value
  • 32-bit integer value
  • 32-bit binary value
  • 32-bit mask
  • Null-terminated character string

If the InfoType argument is SQL_DRIVER_HDESC or SQL_DRIVER_HSTMT, InfoValuePtr is both input and output argument.

SQLSMALLINT BufferLength Input The maximum length of the buffer pointed by InfoValuePtr pointer. If *InfoValuePtr is a Unicode string, the BufferLength argument must be an even number.
SQLSMALLINT * StringLengthPtr Output Pointer to location where this function returns the total number of bytes of information that is available to return. For string output, the length does not include the null terminating character.

If the value in the location pointed by StringLengthPtr is greater than the size specified in BufferLength, the string output information would be truncated to BufferLength - 1 bytes and the function returns with SQL_SUCCESS_WITH_INFO.

Usage

See Information returned by SQLGetInfo() for a list of the possible values of the InfoType argument and a description of the information that the SQLGetInfo() function would return for that value.

Return codes

Diagnostics

Table 2. SQLGetInfo SQLSTATEs
SQLSTATE Description Explanation
01004 Data truncated. The requested information is returned as a string, and its length exceeded the length of the application buffer as specified in the BufferLength argument. The StringLengthPtr argument contains the actual (not truncated) length of the requested information. (Function returns SQL_SUCCESS_WITH_INFO return code.)
08003 Connection is closed. The type of information that is requested in the InfoType argument requires an open connection. Only the SQL_ODBC_VER information does not require an open connection.
40003 08S01 Communication link failure. The communication link between the application and data source failed before the function completed.
58004 Unexpected system failure. Unrecoverable system error.
HY001 Memory allocation failure. DB2® CLI is unable to allocate memory required to support execution or completion of the function. It is likely that process-level memory has been exhausted for the application process. Consult the operating system configuration for information on process-level memory limitations.
HY090 Invalid string or buffer length. The value specified for the BufferLength argument is less than 0.
HY096 Information type out of range. An invalid InfoType argument is specified.
HYC00 Driver not capable. The value specified in the InfoType argument is not supported by either CLI or the data source.

Restrictions

None.

Example

    /* get server name information */
    cliRC = SQLGetInfo(hdbc, SQL_DBMS_NAME, imageInfoBuf, 255, &outlen);

    /* ... */

    /* get client driver name information */
    cliRC = SQLGetInfo(hdbc, SQL_DRIVER_NAME, imageInfoBuf, 255, &outlen);

Information that is returned by the SQLGetInfo() function

Note: CLI returns a value for each InfoType argument in this table. If the InfoType argument does not apply or is not supported, the result is dependent on the return type. If the return type is a:
  • Character string ("Y" or "N"), "N" is returned.
  • Character string (not "Y" or "N"), an empty string is returned.
  • 32-bit integer, 0 (zero) is returned.
  • 32-bit mask, 0 (zero) is returned.
SQL_ACCESSIBLE_PROCEDURES (string)
A character string of "Y" indicates that you can run all procedures that are returned by the function SQLProcedures(). "N" indicates there might be procedures returned that you cannot run.
SQL_ACCESSIBLE_TABLES (string)
A character string of "Y" indicates that you are guaranteed SELECT privilege to all tables that are returned by the function SQLTables(). "N" indicates that there might be tables returned that you cannot access.
SQL_AGGREGATE_FUNCTIONS (32-bit mask)
A bit mask that enumerates support for the listed aggregation functions:
  • SQL_AF_ALL
  • SQL_AF_AVG
  • SQL_AF_COUNT
  • SQL_AF_DISTINCT
  • SQL_AF_MAX
  • SQL_AF_MIN
  • SQL_AF_SUM
SQL_ALTER_DOMAIN (32-bit mask)
CLI returns 0 that indicates that the ALTER DOMAIN statement is not supported.
ODBC also defines the listed values that are not returned by CLI:
  • SQL_AD_ADD_CONSTRAINT_DEFERRABLE
  • SQL_AD_ADD_CONSTRAINT_NON_DEFERRABLE
  • SQL_AD_ADD_CONSTRAINT_INITIALLY_DEFERRED
  • SQL_AD_ADD_CONSTRAINT_INITIALLY_IMMEDIATE
  • SQL_AD_ADD_DOMAIN_CONSTRAINT
  • SQL_AD_ADD_DOMAIN_DEFAULT
  • SQL_AD_CONSTRAINT_NAME_DEFINITION
  • SQL_AD_DROP_DOMAIN_CONSTRAINT
  • SQL_AD_DROP_DOMAIN_DEFAULT
SQL_ALTER_TABLE (32-bit mask)
Indicates which clauses in the ALTER TABLE statement are supported by the DBMS:
  • SQL_AT_ADD_COLUMN_COLLATION
  • SQL_AT_ADD_COLUMN_DEFAULT
  • SQL_AT_ADD_COLUMN_SINGLE
  • SQL_AT_ADD_CONSTRAINT
  • SQL_AT_ADD_TABLE_CONSTRAINT
  • SQL_AT_CONSTRAINT_NAME_DEFINITION
  • SQL_AT_DROP_COLUMN_CASCADE
  • SQL_AT_DROP_COLUMN_DEFAULT
  • SQL_AT_DROP_COLUMN_RESTRICT
  • SQL_AT_DROP_TABLE_CONSTRAINT_CASCADE
  • SQL_AT_DROP_TABLE_CONSTRAINT_RESTRICT
  • SQL_AT_SET_COLUMN_DEFAULT
  • SQL_AT_CONSTRAINT_INITIALLY_DEFERRED
  • SQL_AT_CONSTRAINT_INITIALLY_IMMEDIATE
  • SQL_AT_CONSTRAINT_DEFERRABLE
  • SQL_AT_CONSTRAINT_NON_DEFERRABLE
SQL_APPLICATION_CODEPAGE (32-bit unsigned integer)
Indicates the application code page.
SQL_ASYNC_MODE (32-bit unsigned integer)
Indicates the level of asynchronous support in the driver:
  • SQL_AM_CONNECTION : Connection level asynchronous execution is supported. Either all statement handles that are associated with a given connection handle are in asynchronous mode, or all are in synchronous mode. A statement handle that is on a connection cannot be in asynchronous mode while another statement handle on the same connection is in synchronous mode, and vice versa.
  • SQL_AM_STATEMENT : Statement level asynchronous execution is supported. Some statement handles that are associated with a connection handle can be in asynchronous mode, while other statement handles on the same connection are in synchronous mode.
  • SQL_AM_NONE : Asynchronous mode is not supported.

    This value is also returned if the CLI/ODBC configuration keyword ASYNCENABLE is set to disable asynchronous execution.

SQL_BATCH_ROW_COUNT (32-bit mask)
Indicates how row counts are dealt with. CLI always returns SQL_BRC_ROLLED_UP, which indicates that row counts for consecutive INSERT, DELETE, or UPDATE statements are rolled into one.
ODBC also defines the values that are not returned by CLI:
  • SQL_BRC_PROCEDURES
  • SQL_BRC_EXPLICIT
SQL_BATCH_SUPPORT (32-bit mask)
Indicates which levels of batches are supported:
  • SQL_BS_SELECT_EXPLICIT : Supports explicit batches that can have result-set generating statements.
  • SQL_BS_ROW_COUNT_EXPLICIT : Supports explicit batches that can have row-count generating statements.
  • SQL_BS_SELECT_PROC : Supports explicit procedures that can have result-set generating statements.
  • SQL_BS_ROW_COUNT_PROC : Supports explicit procedures that can have row-count generating statements.
SQL_BOOKMARK_PERSISTENCE (32-bit mask)
Indicates when bookmarks remain valid after an operation:
  • SQL_BP_CLOSE : After an application calls SQLFreeStmt() with the SQL_CLOSE option, or SQLCloseCursor() to close the cursor associated with a statement.
  • SQL_BP_DELETE : After that row has been deleted.
  • SQL_BP_DROP : Bookmarks are valid after an application calls SQLFreeHandle() with a HandleType of SQL_HANDLE_STMT to drop a statement.
  • SQL_BP_TRANSACTION : After an application commits or rolls back a transaction.
  • SQL_BP_UPDATE : After any column in that row has been updated, including key columns.
  • SQL_BP_OTHER_HSTMT : A bookmark that is associated with one statement can be used with another statement. Unless SQL_BP_CLOSE or SQL_BP_DROP is specified, the cursor on the first statement must be open.
SQL_CATALOG_LOCATION (16-bit integer)
A 16-bit integer value that indicates the position of the qualifier in a qualified table name. CLI always returns SQL_CL_START for this information type. ODBC also defines the value SQL_CL_END which is not returned by CLI.

In previous versions of CLI this InfoType argument was SQL_QUALIFIER_LOCATION.

SQL_CATALOG_NAME (string)
A character string of "Y" indicates that the server supports catalog names. "N" indicates that catalog names are not supported.
SQL_CATALOG_NAME_SEPARATOR (string)
The character(s) used as a separator between a catalog name and the qualified name element that follows or precedes it.

In previous versions of CLI this InfoType was SQL_QUALIFIER_NAME_SEPARATOR.

SQL_CATALOG_TERM (string)
The qualifier (catalog) terminology that is used by the database vendor.

The name that the vendor uses for the high-order part of a three-part name.

If the target DBMS does not support three-part naming, a zero-length string is returned.

In previous versions of CLI this InfoType argument was SQL_QUALIFIER_TERM.

SQL_CATALOG_USAGE (32-bit mask)
A 32-bit mask enumerating the statements in which you can use catalogs. The SQL_CATALOG_USAGE is similar to SQL_SCHEMA_USAGE, except that SQL_CATALOG_USAGE is specific for catalogs.
  • SQL_CU_DML_STATEMENTS : All data manipulation language (DML) statements.
  • SQL_CU_INDEX_DEFINITION : All index definition statements.
  • SQL_CU_PRIVILEGE_DEFINITION : All privilege definition statements.
  • SQL_CU_PROCEDURE_INVOCATION : The ODBC procedure invocation statement.
  • SQL_CU_TABLE_DEFINITION : All table definition statements.

A value of 0 is returned if catalogs are not supported by the data source.

In previous versions of CLI, this InfoType argument was SQL_QUALIFIER_USAGE.

SQL_COLLATION_SEQ (string)
Indicates the name of the default collation sequence for the default character set for this server (for example ISO 8859-1 or EBCDIC). If the collation sequence is unknown, an empty string is returned.
SQL_COLUMN_ALIAS (string)
Returns "Y" if column aliases are supported, or "N" if they are not.
SQL_CONCAT_NULL_BEHAVIOR (16-bit integer)
Indicates how the concatenation of NULL valued character data type columns with non-NULL valued character data type columns is handled.
  • SQL_CB_NULL : A NULL value (this behavior is the case for IBM® RDBMS).
  • SQL_CB_NON_NULL : A concatenation of non-NULL column values.
SQL_CONVERT_* (32-bit masks)

SQL_CONVERT_BIGINT (32-bit mask)
SQL_CONVERT_BINARY (32-bit mask)
SQL_CONVERT_BIT (32-bit mask)
SQL_CONVERT_CHAR (32-bit mask)
SQL_CONVERT_DATE (32-bit mask)
SQL_CONVERT_DECIMAL (32-bit mask)
SQL_CONVERT_DOUBLE (32-bit mask)
SQL_CONVERT_FLOAT (32-bit mask)
SQL_CONVERT_INTEGER (32-bit mask)
SQL_CONVERT_INTERVAL_YEAR_MONTH (32-bit mask)
SQL_CONVERT_INTERVAL_DAY_TIME (32-bit mask)
SQL_CONVERT_LONGVARBINARY (32-bit mask)
SQL_CONVERT_LONGVARCHAR (32-bit mask)
SQL_CONVERT_NUMERIC (32-bit mask)
SQL_CONVERT_REAL (32-bit mask)
SQL_CONVERT_SMALLINT (32-bit mask)
SQL_CONVERT_TIME (32-bit mask)
SQL_CONVERT_TIMESTAMP (32-bit mask)
SQL_CONVERT_TINYINT (32-bit mask)
SQL_CONVERT_VARBINARY (32-bit mask)
SQL_CONVERT_VARCHAR (32-bit mask)
SQL_CONVERT_WCHAR (32-bit mask)
SQL_CONVERT_WLONGVARCHAR (32-bit mask)
SQL_CONVERT_WVARCHAR (32-bit mask)

Indicates the conversions that are supported by the data source with the CONVERT scalar function for data of the type named in the InfoType. If the bit mask equals zero, the data source does not support any conversions for the named data type, including conversions to the same data type.

For example, to find out if a data source supports the conversion of SQL_INTEGER data to the SQL_DECIMAL data type, an application calls SQLGetInfo() function with the InfoType argument of SQL_CONVERT_INTEGER. The application then performs AND operation on the returned bit mask with SQL_CVT_DECIMAL. If the resulting value is nonzero, the conversion is supported.

The listed bit masks are used to determine which conversions are supported:
  • SQL_CVT_BIGINT
  • SQL_CVT_BINARY
  • SQL_CVT_BIT
  • SQL_CVT_CHAR
  • SQL_CVT_DATE
  • SQL_CVT_DECIMAL
  • SQL_CVT_DOUBLE
  • SQL_CVT_FLOAT
  • SQL_CVT_INTEGER
  • SQL_CVT_INTERVAL_YEAR_MONTH
  • SQL_CVT_INTERVAL_DAY_TIME
  • SQL_CVT_LONGVARBINARY
  • SQL_CVT_LONGVARCHAR
  • SQL_CVT_NUMERIC
  • SQL_CVT_REAL
  • SQL_CVT_SMALLINT
  • SQL_CVT_TIME
  • SQL_CVT_TIMESTAMP
  • SQL_CVT_TINYINT
  • SQL_CVT_VARBINARY
  • SQL_CVT_VARCHAR
  • SQL_CVT_WCHAR
  • SQL_CVT_WLONGVARCHAR
  • SQL_CVT_WVARCHAR
SQL_CONNECT_CODEPAGE (32-bit unsigned integer)
Indicates the code page of the current connection.
SQL_CONVERT_FUNCTIONS (32-bit mask)
Indicates the scalar conversion functions that are supported by the driver and associated data source.
CLI Version 2.1.1 and later supports ODBC scalar conversions between char variables (CHAR, VARCHAR, LONG VARCHAR, and CLOB) and DOUBLE (or FLOAT).
  • SQL_FN_CVT_CONVERT : Used to determine which conversion functions are supported.
SQL_CORRELATION_NAME (16-bit integer)
Indicates the degree of correlation name support by the server:
  • SQL_CN_ANY : Any valid user-defined name is supported.
  • SQL_CN_NONE : Correlation name is not supported.
  • SQL_CN_DIFFERENT : Correlation name is supported, but it must be different than the name of the table that it represents.
SQL_CREATE_ASSERTION (32-bit mask)
Indicates which clauses in the CREATE ASSERTION statement are supported by the DBMS. CLI always returns zero; the CREATE ASSERTION statement is not supported.
ODBC also defines the listed values that are not returned by CLI:
  • SQL_CA_CREATE_ASSERTION
  • SQL_CA_CONSTRAINT_INITIALLY_DEFERRED
  • SQL_CA_CONSTRAINT_INITIALLY_IMMEDIATE
  • SQL_CA_CONSTRAINT_DEFERRABLE
  • SQL_CA_CONSTRAINT_NON_DEFERRABLE
SQL_CREATE_CHARACTER_SET (32-bit mask)
Indicates which clauses in the CREATE CHARACTER SET statement are supported by the DBMS. CLI always returns zero; the CREATE CHARACTER SET statement is not supported.
ODBC also defines the listed values that are not returned by CLI:
  • SQL_CCS_CREATE_CHARACTER_SET
  • SQL_CCS_COLLATE_CLAUSE
  • SQL_CCS_LIMITED_COLLATION
SQL_CREATE_COLLATION (32-bit mask)
Indicates which clauses in the CREATE COLLATION statement are supported by the DBMS. CLI always returns zero; the CREATE COLLATION statement is not supported.
ODBC also defines the listed values that are not returned by CLI:
  • SQL_CCOL_CREATE_COLLATION
SQL_CREATE_DOMAIN (32-bit mask)
Indicates which clauses in the CREATE DOMAIN statement are supported by the DBMS. CLI always returns zero; the CREATE DOMAIN statement is not supported.
ODBC also defines the listed values that are not returned by CLI:
  • SQL_CDO_CREATE_DOMAIN
  • SQL_CDO_CONSTRAINT_NAME_DEFINITION
  • SQL_CDO_DEFAULT
  • SQL_CDO_CONSTRAINT
  • SQL_CDO_COLLATION
  • SQL_CDO_CONSTRAINT_INITIALLY_DEFERRED
  • SQL_CDO_CONSTRAINT_INITIALLY_IMMEDIATE
  • SQL_CDO_CONSTRAINT_DEFERRABLE
  • SQL_CDO_CONSTRAINT_NON_DEFERRABLE
SQL_CREATE_MODULE (32-bit mask)
Indicates which clauses in the CREATE MODULE statement are supported by the DBMS.CLI always returns zero for z/OS®.
CLI returns the listed values:
  • SQL_CM_CREATE_MODULE
  • SQL_CM_AUTHORIZATION
  • SQL_CM_DEFAULT_CHARACTER_SET
SQL_CREATE_SCHEMA (32-bit mask)
Indicates which clauses in the CREATE SCHEMA statement are supported by the DBMS:
  • SQL_CS_CREATE_SCHEMA
  • SQL_CS_AUTHORIZATION
  • SQL_CS_DEFAULT_CHARACTER_SET
SQL_CREATE_TABLE (32-bit mask)
Indicates which clauses in the CREATE TABLE statement are supported by the DBMS.
The lilsted bit masks are used to determine which clauses are supported:
  • SQL_CT_CREATE_TABLE
  • SQL_CT_TABLE_CONSTRAINT
  • SQL_CT_CONSTRAINT_NAME_DEFINITION
The listed bits specify the ability to create temporary tables:
  • SQL_CT_COMMIT_PRESERVE : Deleted rows are preserved on commit.
  • SQL_CT_COMMIT_DELETE : Deleted rows are deleted on commit.
  • SQL_CT_GLOBAL_TEMPORARY : Global temporary tables can be created.
  • SQL_CT_LOCAL_TEMPORARY : Local temporary tables can be created.
The listed bits specify the ability to create column constraints:
  • SQL_CT_COLUMN_CONSTRAINT : Specifying column constraints is supported.
  • SQL_CT_COLUMN_DEFAULT : Specifying column defaults is supported.
  • SQL_CT_COLUMN_COLLATION : Specifying column collation is supported.
The listed bits specify the supported constraint attributes, if specifying column or table constraints is supported:
  • SQL_CT_CONSTRAINT_INITIALLY_DEFERRED
  • SQL_CT_CONSTRAINT_INITIALLY_IMMEDIATE
  • SQL_CT_CONSTRAINT_DEFERRABLE
  • SQL_CT_CONSTRAINT_NON_DEFERRABLE
SQL_CREATE_TRANSLATION (32-bit mask)
Indicates which clauses in the CREATE TRANSLATION statement are supported by the DBMS. CLI always returns zero; the CREATE TRANSLATION statement is not supported.
ODBC also defines the listed value that is not returned by CLI:
  • SQL_CTR_CREATE_TRANSLATION
SQL_CREATE_VIEW (32-bit mask)
Indicates which clauses in the CREATE VIEW statement are supported by the DBMS:
  • SQL_CV_CREATE_VIEW
  • SQL_CV_CHECK_OPTION
  • SQL_CV_CASCADED
  • SQL_CV_LOCAL
A return value of 0 means that the CREATE VIEW statement is not supported.
SQL_CURSOR_COMMIT_BEHAVIOR (16-bit integer)
Indicates how a COMMIT operation affects cursors. A value of:
  • SQL_CB_DELETE, deletes cursors and drops access plans for dynamic SQL statements.
  • SQL_CB_CLOSE, deletes cursors, but retains access plans for dynamic SQL statements (including non-query statements)
  • SQL_CB_PRESERVE, retains cursors and access plans for dynamic statements (including non-query statements). Applications can continue to fetch data, or close the cursor and re-execute the query without preparing again the statement.
    Note: After COMMIT, a FETCH must be issued to reposition the cursor before actions such as positioned updates or deletes can be taken.
SQL_CURSOR_ROLLBACK_BEHAVIOR (16-bit integer)
Indicates how a ROLLBACK operation affects cursors. A value of:
  • SQL_CB_DELETE, deletes cursors and drops access plans for dynamic SQL statements.
  • SQL_CB_CLOSE, deletes cursors, but retains access plans for dynamic SQL statements (including non-query statements)
  • SQL_CB_PRESERVE, retains cursors and access plans for dynamic statements (including non-query statements). Applications can continue to fetch data, or close the cursor and re-execute the query without preparing again the statement.
    Note: DB2 servers do not have the SQL_CB_PRESERVE property.
SQL_CURSOR_SENSITIVITY (32-bit unsigned integer)
Indicates support for cursor sensitivity:
  • SQL_INSENSITIVE, all cursors on the statement handle show the result set without reflecting any changes made to it by any other cursor within the same transaction.
  • SQL_UNSPECIFIED, it is unspecified whether cursors on the statement handle make visible the changes made to a result set by another cursor within the same transaction. Cursors on the statement handle might make visible none, some, or all such changes.
  • SQL_SENSITIVE, cursors are sensitive to changes made by other cursors within the same transaction.
SQL_DATA_SOURCE_NAME (string)
Indicates the data source name used during connection. If the application called SQLConnect(), this character string is the value of the szDSN argument. If the application called SQLDriverConnect() or SQLBrowseConnect(), this character string is the value of the DSN keyword in the connection string passed to the driver. If the connection string did not contain the DSN keyword, this character string is an empty string.
SQL_DATA_SOURCE_READ_ONLY (string)
A character string of "Y" indicates that the database is set to READ ONLY mode, "N" indicates that is not set to READ ONLY mode. This characteristic pertains only to the data source itself; it is not characteristic of the driver that enables access to the data source.
SQL_DATABASE_CODEPAGE (32-bit unsigned integer)
Indicates the code page of the database that the application is currently connected to.
SQL_DATABASE_NAME (string)
The name of the current database in use
Note: This string is the same as that returned by the SELECT CURRENT SERVER statement on non-host systems. For host databases, such as DB2 for z/OS or DB2 for i, the string returned is the DCS database name. This database name was provided when the CATALOG DCS DATABASE DIRECTORY command was issued at the DB2 Connect™ gateway.
SQL_DATETIME_LITERALS (32-bit unsigned integer)
Indicates the datetime literals that are supported by the DBMS. CLI always returns zero; datetime literals are not supported.
ODBC also defines the listed values that are not returned by CLI:
  • SQL_DL_SQL92_DATE
  • SQL_DL_SQL92_TIME
  • SQL_DL_SQL92_TIMESTAMP
  • SQL_DL_SQL92_INTERVAL_YEAR
  • SQL_DL_SQL92_INTERVAL_MONTH
  • SQL_DL_SQL92_INTERVAL_DAY
  • SQL_DL_SQL92_INTERVAL_HOUR
  • SQL_DL_SQL92_INTERVAL_MINUTE
  • SQL_DL_SQL92_INTERVAL_SECOND
  • SQL_DL_SQL92_INTERVAL_YEAR_TO_MONTH
  • SQL_DL_SQL92_INTERVAL_DAY_TO_HOUR
  • SQL_DL_SQL92_INTERVAL_DAY_TO_MINUTE
  • SQL_DL_SQL92_INTERVAL_DAY_TO_SECOND
  • SQL_DL_SQL92_INTERVAL_HOUR_TO_MINUTE
  • SQL_DL_SQL92_INTERVAL_HOUR_TO_SECOND
  • SQL_DL_SQL92_INTERVAL_MINUTE_TO_SECOND
SQL_DBMS_NAME (string)
The name of the DBMS product being accessed
For example:
  • "DB2/6000"
  • "DB2/2"
SQL_DBMS_VER (string)
The Version of the DBMS product accessed. A string of the form 'mm.vv.rrrr' where mm is the major version, vv is the minor version, and rrrr is the release number. For example, "0r.01.0000" translates to major version r, minor version 1, release 0.
SQL_DDL_INDEX (32-bit unsigned integer)
Indicates support for the creation and dropping of indexes:
  • SQL_DI_CREATE_INDEX
  • SQL_DI_DROP_INDEX
SQL_DEFAULT_TXN_ISOLATION (32-bit mask)
The default transaction isolation level supported
One of the lilsted masks are returned:
  • SQL_TXN_READ_UNCOMMITTED : Changes are immediately perceived by all transactions (dirty read, non-repeatable read, and phantoms are possible).

    This behavior is equivalent to Uncommitted Read level for IBM databases.

  • SQL_TXN_READ_COMMITTED : Row read by transaction 1 can be altered and committed by transaction 2 (non-repeatable read and phantoms are possible)

    This behavior is equivalent to Cursor Stability level in IBM databases.

  • SQL_TXN_REPEATABLE_READ : A transaction can add or remove rows matching the search condition or a pending transaction (repeatable read, but phantoms are possible)

    This behavior is equivalent to Read Stability level in IBM databases.

  • SQL_TXN_SERIALIZABLE : Data affected by pending transaction is not available to other transactions (repeatable read, phantoms are not possible)

    This behavior is equivalent to Repeatable Read level in IBM databases.

  • SQL_TXN_VERSIONING : Not applicable to IBM DBMSs.
  • SQL_TXN_NOCOMMIT : Any changes are effectively committed at the end of a successful operation; no explicit commit or rollback is allowed.

    This is a IBM DB2 for IBM i isolation level.

In IBM terminology,
  • SQL_TXN_READ_UNCOMMITTED is Uncommitted Read;
  • SQL_TXN_READ_COMMITTED is Cursor Stability;
  • SQL_TXN_REPEATABLE_READ is Read Stability;
  • SQL_TXN_SERIALIZABLE is Repeatable Read.
SQL_DESCRIBE_PARAMETER (string)
"Y" if parameters can be described; "N" if not.
SQL_DM_VER (string)
Reserved.
SQL_DRIVER_BLDLEVEL
Build level information about the current version of CLI.

The information is in the listed format: sYYMMDD, where YY is the year of the build, MM is the month and DD is the day. For example, s100610.

For special builds, the format is: special_JOBID, where JOBID is the special build's job identification. For example, special_39899.

For full version information, use SQL_DRIVER_BLDLEVEL with SQL_DRIVER_VER.

SQL_DRIVER_HDBC (32 bits)
CLI's database handle
SQL_DRIVER_HDESC (32 bits)
CLI's descriptor handle
SQL_DRIVER_HENV (32 bits)
CLI's environment handle
SQL_DRIVER_HLIB (32 bits)
Reserved.
SQL_DRIVER_HSTMT (32 bits)
CLI's statement handle

In an ODBC environment with an ODBC Driver Manager, if InfoType is set to SQL_DRIVER_HSTMT, the Driver Manager statement handle (the one returned from SQLAllocStmt()) must be passed on input in rgbInfoValue from the application. In this case rgbInfoValue is both an input and an output argument. The ODBC Driver Manager is responsible for returning the mapped value. ODBC applications wishing to call CLI specific functions (such as the LOB functions) can access them, by passing these handle values to the functions after loading the CLI library and issuing an operating system function call to invoke the desired functions.

SQL_DRIVER_NAME (string)
The file name of the CLI implementation.
SQL_DRIVER_ODBC_VER (string)
The version number of ODBC that CLI supports. By Default CLI returns "03.51". You can call the SQLSetEnvAttr() function to change the ODBC driver version. If you set the SQL_ATTR_ODBC_VERSION attribute to SQL_OV_ODBC3_80 (value 380), CLI returns "03.80".
SQL_DRIVER_VER (string)
The version of the IBM Data Server Driver for ODBC and CLI. A string of the form 'mm.vv.rrrr' where mm is the major version, vv is the minor version, and rrrr is the release. For example, "05.01.0000" translates to major version 5, minor version 1, release 0. For full version information, use SQL_DRIVER_VER with SQL_DRIVER_BLDLEVEL.
SQL_DROP_ASSERTION (32-bit unsigned integer)
Indicates which clause in the DROP ASSERTION statement is supported by the DBMS. CLI always returns zero; the DROP ASSERTION statement is not supported.

ODBC also defines the SQL_DA_DROP_ASSERTION value that is not returned by CLI.

SQL_DROP_CHARACTER_SET (32-bit unsigned integer)
Indicates which clause in the DROP CHARACTER SET statement is supported by the DBMS. CLI always returns zero; the DROP CHARACTER SET statement is not supported.

ODBC also defines the SQL_DCS_DROP_CHARACTER_SET value that is not returned by CLI.

SQL_DROP_COLLATION (32-bit unsigned integer)
Indicates which clause in the DROP COLLATION statement is supported by the DBMS. CLI always returns zero; the DROP COLLATION statement is not supported.

ODBC also defines the SQL_DC_DROP_COLLATION value that is not returned by CLI.

SQL_DROP_DOMAIN (32-bit unsigned integer)
Indicates which clauses in the DROP DOMAIN statement are supported by the DBMS. CLI always returns zero; the DROP DOMAIN statement is not supported.
ODBC also defines the listed values that are not returned by CLI:
  • SQL_DD_DROP_DOMAIN
  • SQL_DD_CASCADE
  • SQL_DD_RESTRICT
SQL_DROP_MODULE (32-bit unsigned integer)
Indicates which clauses in the DROP MODULE statement are supported by the DBMS. CLI always returns zero for DB2 for z/OS.
CLI returns the listed values:
  • SQL_DM_DROP_MODULE
  • SQL_DM_RESTRICT
SQL_DROP_SCHEMA (32-bit unsigned integer)
Indicates which clauses in the DROP SCHEMA statement are supported by the DBMS. CLI always returns zero; the DROP SCHEMA statement is not supported.
ODBC also defines the listed values that are not returned by CLI:
  • SQL_DS_CASCADE
  • SQL_DS_RESTRICT
SQL_DROP_TABLE (32-bit unsigned integer)
Indicates which clauses in the DROP TABLE statement are supported by the DBMS. Valid returned values are:
  • SQL_DT_DROP_TABLE
  • SQL_DT_CASCADE
  • SQL_DT_RESTRICT
SQL_DROP_TRANSLATION (32-bit unsigned integer)
Indicates which clauses in the DROP TRANSLATION statement are supported by the DBMS. CLI always returns zero; the DROP TRANSLATION statement is not supported.
ODBC also defines the listed value that is not returned by CLI:
  • SQL_DTR_DROP_TRANSLATION
SQL_DROP_VIEW (32-bit unsigned integer)
Indicates which clauses in the DROP VIEW statement are supported by the DBMS. CLI always returns zero; the DROP VIEW statement is not supported.
ODBC also defines the listed values that are not returned by CLI:
  • SQL_DV_CASCADE
  • SQL_DV_RESTRICT
SQL_DTC_TRANSITION_COST (32-bit unsigned mask)
Used by Microsoft Transaction Server to determine whether the enlistment process for a connection is expensive. CLI returns:
  • SQL_DTC_ENLIST_EXPENSIVE
  • SQL_DTC_UNENLIST_EXPENSIVE
SQL_DYNAMIC_CURSOR_ATTRIBUTES1 (32-bit mask)
Indicates the attributes of a dynamic cursor that are supported by CLI (subset 1 of 2). Valid returned values are:
  • SQL_CA1_NEXT
  • SQL_CA1_ABSOLUTE
  • SQL_CA1_RELATIVE
  • SQL_CA1_BOOKMARK
  • SQL_CA1_LOCK_EXCLUSIVE
  • SQL_CA1_LOCK_NO_CHANGE
  • SQL_CA1_LOCK_UNLOCK
  • SQL_CA1_POS_POSITION
  • SQL_CA1_POS_UPDATE
  • SQL_CA1_POS_DELETE
  • SQL_CA1_POS_REFRESH
  • SQL_CA1_POSITIONED_UPDATE
  • SQL_CA1_POSITIONED_DELETE
  • SQL_CA1_SELECT_FOR_UPDATE
  • SQL_CA1_BULK_ADD
  • SQL_CA1_BULK_UPDATE_BY_BOOKMARK
  • SQL_CA1_BULK_DELETE_BY_BOOKMARK
  • SQL_CA1_BULK_FETCH_BY_BOOKMARK
SQL_DYNAMIC_CURSOR_ATTRIBUTES2 (32-bit mask)
Indicates the attributes of a dynamic cursor that are supported by CLI (subset 2 of 2). Valid returned values are:
  • SQL_CA2_READ_ONLY_CONCURRENCY
  • SQL_CA2_LOCK_CONCURRENCY
  • SQL_CA2_OPT_ROWVER_CONCURRENCY
  • SQL_CA2_OPT_VALUES_CONCURRENCY
  • SQL_CA2_SENSITIVITY_ADDITIONS
  • SQL_CA2_SENSITIVITY_DELETIONS
  • SQL_CA2_SENSITIVITY_UPDATES
  • SQL_CA2_MAX_ROWS_SELECT
  • SQL_CA2_MAX_ROWS_INSERT
  • SQL_CA2_MAX_ROWS_DELETE
  • SQL_CA2_MAX_ROWS_UPDATE
  • SQL_CA2_MAX_ROWS_CATALOG
  • SQL_CA2_MAX_ROWS_AFFECTS_ALL
  • SQL_CA2_CRC_EXACT
  • SQL_CA2_CRC_APPROXIMATE
  • SQL_CA2_SIMULATE_NON_UNIQUE
  • SQL_CA2_SIMULATE_TRY_UNIQUE
  • SQL_CA2_SIMULATE_UNIQUE
SQL_EXPRESSIONS_IN_ORDERBY (string)
The character string "Y" indicates that the database server supports the DIRECT specification of expressions in the ORDER BY list, "N" indicates that it does not.
SQL_FETCH_DIRECTION (32-bit mask)
The supported fetch directions.
The listed bit masks are used with the flag to determine which options are supported:
  • SQL_FD_FETCH_NEXT
  • SQL_FD_FETCH_FIRST
  • SQL_FD_FETCH_LAST
  • SQL_FD_FETCH_PREV
  • SQL_FD_FETCH_ABSOLUTE
  • SQL_FD_FETCH_RELATIVE
  • SQL_FD_FETCH_RESUME
SQL_FILE_USAGE (16-bit integer)
Indicates how a single-tier driver directly treats files in a data source. The IBM Data Server Driver for ODBC and CLI driver is not a single-tier driver, and therefore always returns SQL_FILE_NOT_SUPPORTED.
ODBC also defines the listed values that are not returned by CLI:
  • SQL_FILE_TABLE
  • SQL_FILE_CATALOG
SQL_FORWARD_ONLY_CURSOR_ATTRIBUTES1 (32-bit mask)
Indicates the attributes of a forward-only cursor that are supported by CLI. Valid returned values are (subset 1 of 2):
  • SQL_CA1_NEXT
  • SQL_CA1_POSITIONED_UPDATE
  • SQL_CA1_POSITIONED_DELETE
  • SQL_CA1_SELECT_FOR_UPDATE
  • SQL_CA1_LOCK_EXCLUSIVE
  • SQL_CA1_LOCK_NO_CHANGE
  • SQL_CA1_LOCK_UNLOCK
  • SQL_CA1_POS_POSITION
  • SQL_CA1_POS_UPDATE
  • SQL_CA1_POS_DELETE
  • SQL_CA1_POS_REFRESH
  • SQL_CA1_BULK_ADD
  • SQL_CA1_BULK_UPDATE_BY_BOOKMARK
  • SQL_CA1_BULK_DELETE_BY_BOOKMARK
  • SQL_CA1_BULK_FETCH_BY_BOOKMARK
SQL_FORWARD_ONLY_CURSOR_ATTRIBUTES2 (32-bit mask)
Indicates the attributes of a forward-only cursor that are supported by CLI. Valid returned values are (subset 2 of 2):
  • SQL_CA2_READ_ONLY_CONCURRENCY
  • SQL_CA2_LOCK_CONCURRENCY
  • SQL_CA2_MAX_ROWS_SELECT
  • SQL_CA2_MAX_ROWS_CATALOG
  • SQL_CA2_OPT_ROWVER_CONCURRENCY
  • SQL_CA2_OPT_VALUES_CONCURRENCY
  • SQL_CA2_SENSITIVITY_ADDITIONS
  • SQL_CA2_SENSITIVITY_DELETIONS
  • SQL_CA2_SENSITIVITY_UPDATES
  • SQL_CA2_MAX_ROWS_INSERT
  • SQL_CA2_MAX_ROWS_DELETE
  • SQL_CA2_MAX_ROWS_UPDATE
  • SQL_CA2_MAX_ROWS_AFFECTS_ALL
  • SQL_CA2_CRC_EXACT
  • SQL_CA2_CRC_APPROXIMATE
  • SQL_CA2_SIMULATE_NON_UNIQUE
  • SQL_CA2_SIMULATE_TRY_UNIQUE
  • SQL_CA2_SIMULATE_UNIQUE
SQL_GETDATA_EXTENSIONS (32-bit mask)
Indicates whether extensions to the SQLGetData() function are supported. The listed extensions are currently identified and supported by CLI:
  • SQL_GD_ANY_COLUMN, SQLGetData() can be called for unbound columns that precede the last bound column.
  • SQL_GD_ANY_ORDER, SQLGetData() can be called for columns in any order.
ODBC also defines the listed extensions which are not returned by CLI:
  • SQL_GD_BLOCK
  • SQL_GD_BOUND
SQL_GROUP_BY (16-bit integer)
Indicates the degree of support for the GROUP BY clause by the server. Valid returned values are:
  • SQL_GB_NO_RELATION - No relationship between the columns in the GROUP BY clause and in the SELECT list.
  • SQL_GB_NOT_SUPPORTED - GROUP BY clause not supported.
  • SQL_GB_GROUP_BY_EQUALS_SELECT - GROUP BY clause must include all non-aggregated columns in the SELECT list.
  • SQL_GB_GROUP_BY_CONTAINS_SELECT - GROUP BY clause must contain all non-aggregated columns in the SELECT list.
  • SQL_GB_COLLATE - COLLATE clause can be specified at the end of each grouping column.
SQL_IDENTIFIER_CASE (16-bit integer)
Indicates the case sensitivity of object names (such as table-name).
Valid returned values are::
  • SQL_IC_UPPER : Stored in uppercase.
  • SQL_IC_LOWER : Stored in lowercase.
  • SQL_IC_SENSITIVE : Case sensitive, stored in mixed-case.
  • SQL_IC_MIXED : Not case sensitive, stored in mixed-case.
Note: Identifier names in IBM DBMSs are not case sensitive.
SQL_IDENTIFIER_QUOTE_CHAR (string)
Indicates the character that is used to surround a delimited identifier.
SQL_INDEX_KEYWORDS (32-bit mask)
Indicates the supported keywords for the CREATE INDEX statement. Valid returned values are:
  • SQL_IK_NONE - None of the keywords are supported.
  • SQL_IK_ASC - ASC keyword is supported.
  • SQL_IK_DESC - DESC keyword is supported.
  • SQL_IK_ALL - All keywords are supported.
To see if the CREATE INDEX statement is supported, an application can call the SQLGetInfo() function with the SQL_DLL_INDEX InfoType argument.
SQL_INFO_SCHEMA_VIEWS (32-bit mask)
Indicates the views in the INFORMATION_SCHEMA that are supported. CLI always returns zero; no views in the INFORMATION_SCHEMA are supported.
ODBC also defines the listed values that are not returned by CLI:
  • SQL_ISV_ASSERTIONS
  • SQL_ISV_CHARACTER_SETS
  • SQL_ISV_CHECK_CONSTRAINTS
  • SQL_ISV_COLLATIONS
  • SQL_ISV_COLUMN_DOMAIN_USAGE
  • SQL_ISV_COLUMN_PRIVILEGES
  • SQL_ISV_COLUMNS
  • SQL_ISV_CONSTRAINT_COLUMN_USAGE
  • SQL_ISV_CONSTRAINT_TABLE_USAGE
  • SQL_ISV_DOMAIN_CONSTRAINTS
  • SQL_ISV_DOMAINS
  • SQL_ISV_KEY_COLUMN_USAGE
  • SQL_ISV_REFERENTIAL_CONSTRAINTS
  • SQL_ISV_SCHEMATA
  • SQL_ISV_SQL_LANGUAGES
  • SQL_ISV_TABLE_CONSTRAINTS
  • SQL_ISV_TABLE_PRIVILEGES
  • SQL_ISV_TABLES
  • SQL_ISV_TRANSLATIONS
  • SQL_ISV_USAGE_PRIVILEGES
  • SQL_ISV_VIEW_COLUMN_USAGE
  • SQL_ISV_VIEW_TABLE_USAGE
  • SQL_ISV_VIEWS
SQL_INSERT_STATEMENT (32-bit mask)
Indicates support for INSERT statements. Valid returned values are:
  • SQL_IS_INSERT_LITERALS
  • SQL_IS_INSERT_SEARCHED
  • SQL_IS_SELECT_INTO
SQL_INTEGRITY (string)
The "Y" character string indicates that the data source supports Integrity Enhanced Facility (IEF) in SQL89 and in X/Open XPG4 Embedded SQL, an "N" indicates it does not.

In previous versions of CLI this InfoType argument was SQL_ODBC_SQL_OPT_IEF.

SQL_KEYSET_CURSOR_ATTRIBUTES1 (32-bit mask)
Indicates the attributes of a keyset-driven cursor that are supported by CLI. Valid returned values are (subset 1 of 2):
  • SQL_CA1_NEXT
  • SQL_CA1_ABSOLUTE
  • SQL_CA1_RELATIVE
  • SQL_CA1_BOOKMARK
  • SQL_CA1_LOCK_EXCLUSIVE
  • SQL_CA1_LOCK_NO_CHANGE
  • SQL_CA1_LOCK_UNLOCK
  • SQL_CA1_POS_POSITION
  • SQL_CA1_POS_UPDATE
  • SQL_CA1_POS_DELETE
  • SQL_CA1_POS_REFRESH
  • SQL_CA1_POSITIONED_UPDATE
  • SQL_CA1_POSITIONED_DELETE
  • SQL_CA1_SELECT_FOR_UPDATE
  • SQL_CA1_BULK_ADD
  • SQL_CA1_BULK_UPDATE_BY_BOOKMARK
  • SQL_CA1_BULK_DELETE_BY_BOOKMARK
  • SQL_CA1_BULK_FETCH_BY_BOOKMARK
SQL_KEYSET_CURSOR_ATTRIBUTES2 (32-bit mask)
Indicates the attributes of a keyset-driven cursor that are supported by CLI. Valid returned values are (subset 2 of 2):
  • SQL_CA2_READ_ONLY_CONCURRENCY
  • SQL_CA2_LOCK_CONCURRENCY
  • SQL_CA2_OPT_ROWVER_CONCURRENCY
  • SQL_CA2_OPT_VALUES_CONCURRENCY
  • SQL_CA2_SENSITIVITY_ADDITIONS
  • SQL_CA2_SENSITIVITY_DELETIONS
  • SQL_CA2_SENSITIVITY_UPDATES
  • SQL_CA2_MAX_ROWS_SELECT
  • SQL_CA2_MAX_ROWS_INSERT
  • SQL_CA2_MAX_ROWS_DELETE
  • SQL_CA2_MAX_ROWS_UPDATE
  • SQL_CA2_MAX_ROWS_CATALOG
  • SQL_CA2_MAX_ROWS_AFFECTS_ALL
  • SQL_CA2_CRC_EXACT
  • SQL_CA2_CRC_APPROXIMATE
  • SQL_CA2_SIMULATE_NON_UNIQUE
  • SQL_CA2_SIMULATE_TRY_UNIQUE
  • SQL_CA2_SIMULATE_UNIQUE
SQL_KEYWORDS (string)
Indicates a comma-separated list of all data source-specific keywords. This character string is a list of all reserved keywords. Interoperable applications should not use these keywords in object names. This list does not contain keywords specific to ODBC or keywords that are used by both the data source and ODBC.
SQL_LIKE_ESCAPE_CLAUSE (string)
Indicates whether the data source supports an escape character for the percent character (%) and underscore (_) character in a LIKE predicate. Also, it indicates that the driver supports the ODBC syntax for defining a LIKE predicate escape character.
  • "Y" indicates that there is support for escape characters in a LIKE predicate.
  • "N" indicates that there is no support for escape characters in a LIKE predicate.
SQL_LOCK_TYPES (32-bit mask)
Reserved option, zero is returned for the bit-mask.
SQL_MAX_ASYNC_CONCURRENT_STATEMENTS (32-bit unsigned integer)
The maximum number of active concurrent statements in asynchronous mode that CLI can support on a given connection. This value is zero if there is no specific limit, or the limit is unknown.
SQL_MAX_BINARY_LITERAL_LEN (32-bit unsigned integer)
A 32-bit unsigned integer value specifying the maximum length (number of hexadecimal characters, excluding the literal prefix and suffix returned by SQLGetTypeInfo()) of a binary literal in an SQL statement. For example, the binary literal 0xFFAA has a length of 4. If there is no maximum length or the length is unknown, this value is set to zero.
SQL_MAX_CATALOG_NAME_LEN (16-bit integer)
The maximum length of a catalog name in the data source. This value is zero if there is no maximum length, or the length is unknown.

In previous versions of CLI this fInfoType argument was SQL_MAX_QUALIFIER_NAME_LEN.

SQL_MAX_CHAR_LITERAL_LEN (32-bit unsigned integer)
The maximum length of a character literal in an SQL statement (in bytes). Zero if there is no limit.
SQL_MAX_COLUMN_NAME_LEN (16-bit integer)
The maximum length of a column name (in bytes). Zero if there is no limit.
SQL_MAX_COLUMNS_IN_GROUP_BY (16-bit integer)
Indicates the maximum number of columns that the server supports in a GROUP BY clause. Zero if there is no limit.
SQL_MAX_COLUMNS_IN_INDEX (16-bit integer)
Indicates the maximum number of columns that the server supports in an index. Zero if there is no limit.
SQL_MAX_COLUMNS_IN_ORDER_BY (16-bit integer)
Indicates the maximum number of columns that the server supports in an ORDER BY clause. Zero if there is no limit.
SQL_MAX_COLUMNS_IN_SELECT (16-bit integer)
Indicates the maximum number of columns that the server supports in a SELECT list. Zero if there no limit.
SQL_MAX_COLUMNS_IN_TABLE (16-bit integer)
Indicates the maximum number of columns that the server supports in a base table. Zero if there is no limit.
SQL_MAX_CONCURRENT_ACTIVITIES (16-bit integer)
The maximum number of active environments that CLI can support. If there is no specified limit or the limit is unknown, this value is set to zero.

In previous versions of CLI this InfoType argument SQL_ACTIVE_ENVIRONMENTS.

SQL_MAX_CURSOR_NAME_LEN (16-bit integer)
The maximum length of a cursor name (in bytes). This value is zero if there is no maximum length, or the length is unknown.
SQL_MAX_DRIVER_CONNECTIONS (16-bit integer)
The maximum number of active connections that are supported per application.

If the limit is dependent on system resources, zero is returned.

In previous versions of CLI this InfoType argument was SQL_ACTIVE_CONNECTIONS.

SQL_MAX_IDENTIFIER_LEN (16-bit integer)
The maximum size (in characters) that the data source supports for user-defined names.
SQL_MAX_INDEX_SIZE (32-bit unsigned integer)
Indicates the maximum size in bytes that the server supports for the combined columns in an index. Zero if no limit.
SQL_MAX_MODULE_NAME_LEN (16-bit integer)
Indicates the maximum length in bytes of a module qualifier name.
SQL_MAX_PROCEDURE_NAME_LEN (16-bit integer)
The maximum length of a procedure name (in bytes).
SQL_MAX_ROW_SIZE (32-bit unsigned integer)
Specifies the maximum length in bytes that the server supports in single row of a base table. Zero if there is no limit.
SQL_MAX_ROW_SIZE_INCLUDES_LONG (string)
Set to "Y" to indicate that the value that is returned by SQL_MAX_ROW_SIZE InfoType argument includes the length of product-specific long string data types. Otherwise, set to "N".
SQL_MAX_SCHEMA_NAME_LEN (16-bit integer)
The maximum length of a schema qualifier name (in bytes).

In previous versions of CLI this fInfoType argument was SQL_MAX_OWNER_NAME_LEN.

SQL_MAX_STATEMENT_LEN (32-bit unsigned integer)
Indicates the maximum length of an SQL statement string in bytes, including the number of white spaces in the statement.
SQL_MAX_TABLE_NAME_LEN (16-bit integer)
The maximum length of a table name (in bytes).
SQL_MAX_TABLES_IN_SELECT (16-bit integer)
Indicates the maximum number of table names in a FROM clause in a <query specification>.
SQL_MAX_USER_NAME_LEN (16-bit integer)
Indicates the maximum size for a <user identifier> (in bytes).
SQL_MODULE_USAGE (32-bit mask)
Indicates the type of SQL statements that have a module associated with them when these statements are executed. CLI always returns zero for z/OS.

SQL_MU_PROCEDURE_INVOCATION is supported in the procedure invocation statement.

SQL_MULT_RESULT_SETS (string)
The character string "Y" indicates that the database supports multiple result sets, "N" indicates that it does not.
SQL_MULTIPLE_ACTIVE_TXN (string)
Indicates whether active transactions on multiple connections are permitted.
  • "Y" indicates that multiple connections can have active transactions.
  • "N" indicates that only one connection at a time can have an active transaction.CLI returns "N" for coordinated distributed unit of work (CONNECT TYPE 2) connections, (since the transaction or Unit Of Work spans all connections), and returns "Y" for all other connections.
SQL_NEED_LONG_DATA_LEN (string)
Indicates that a character string is reserved for the use of ODBC. "N" is always returned.
SQL_NON_NULLABLE_COLUMNS (16-bit integer)
Indicates whether non-nullable columns are supported. Valid returned values are:
  • SQL_NNC_NON_NULL - Can be defined as NOT NULL.
  • SQL_NNC_NULL - Cannot be defined as NOT NULL.
SQL_NULL_COLLATION (16-bit integer)
Indicates where NULLs are sorted in a result set. Valid returned values are:
  • SQL_NC_HIGH - Null values sort high.
  • SQL_NC_LOW - Null values sort low.
SQL_NUMERIC_FUNCTIONS (32-bit mask)
Indicates that the ODBC scalar numeric functions are supported. These functions are intended to be used with the ODBC vendor escape sequence.
The listed bit-masks are used to determine which numeric functions are supported:
  • SQL_FN_NUM_ABS
  • SQL_FN_NUM_ACOS
  • SQL_FN_NUM_ASIN
  • SQL_FN_NUM_ATAN
  • SQL_FN_NUM_ATAN2
  • SQL_FN_NUM_CEILING
  • SQL_FN_NUM_COS
  • SQL_FN_NUM_COT
  • SQL_FN_NUM_DEGREES
  • SQL_FN_NUM_EXP
  • SQL_FN_NUM_FLOOR
  • SQL_FN_NUM_LOG
  • SQL_FN_NUM_LOG10
  • SQL_FN_NUM_MOD
  • SQL_FN_NUM_PI
  • SQL_FN_NUM_POWER
  • SQL_FN_NUM_RADIANS
  • SQL_FN_NUM_RAND
  • SQL_FN_NUM_ROUND
  • SQL_FN_NUM_SIGN
  • SQL_FN_NUM_SIN
  • SQL_FN_NUM_SQRT
  • SQL_FN_NUM_TAN
  • SQL_FN_NUM_TRUNCATE
SQL_ODBC_API_CONFORMANCE (16-bit integer)
Indicates the level of ODBC conformance. Valid returned values are:
  • SQL_OAC_NONE
  • SQL_OAC_LEVEL1
  • SQL_OAC_LEVEL2
SQL_ODBC_INTERFACE_CONFORMANCE (32-bit unsigned integer)
Indicates the level of the ODBC 3.0 interface that CLI conforms to:
  • SQL_OIC_CORE : The minimum level that all ODBC drivers are expected to conform to. This level includes basic interface elements such as connection functions; functions for preparing and executing an SQL statement; basic result set metadata functions; basic catalog functions; and so on.
  • SQL_OIC_LEVEL1 : A level that includes the core standards compliance level functionality, plus scrollable cursors, bookmarks, positioned updates and deletes; and so on.
  • SQL_OIC_LEVEL2 : A level that includes the level 1 standards compliance level functionality, plus advanced features such as sensitive cursors; update, delete, and refresh by bookmarks; stored procedure support; catalog functions for primary and foreign keys; multi-catalog support; and so on.
SQL_ODBC_SAG_CLI_CONFORMANCE (16-bit integer)
The compliance to the functions of the SQL Access Group (SAG) CLI specification.
Valid returned values are:
  • SQL_OSCC_NOT_COMPLIANT : The driver is not SAG-compliant.
  • SQL_OSCC_COMPLIANT : The driver is SAG-compliant.
SQL_ODBC_SQL_CONFORMANCE (16-bit integer)
Valid returned values are:
  • SQL_OSC_MINIMUM : Minimum ODBC SQL grammar supported
  • SQL_OSC_CORE : Core ODBC SQL Grammar supported
  • SQL_OSC_EXTENDED : Extended ODBC SQL Grammar supported
SQL_ODBC_VER (string)
The ODBC version number that the driver manager supports.

CLI returns the string "03.01.0000". CLI returns the string "03.01.0000". For Windows 7 and Windows Server 2008 R2 operating systems, CLI returns the string "03.80.0000".

SQL_OJ_CAPABILITIES (32-bit mask)
A 32-bit bit-mask enumerating the types of outer join supported.
The bitmasks are:
  • SQL_OJ_LEFT : Left outer join is supported.
  • SQL_OJ_RIGHT : Right outer join is supported.
  • SQL_OJ_FULL : Full outer join is supported.
  • SQL_OJ_NESTED : Nested outer join is supported.
  • SQL_OJ_ORDERED : The order of the tables underlying the columns in the outer join ON clause do not have to be in the same order as the tables in the JOIN clause.
  • SQL_OJ_INNER : The inner table of an outer join can also be an inner join.
  • SQL_OJ_ALL_COMPARISONS_OPS : Any predicate can be used in the outer join ON clause. If this bit is not set, only the equality (=) comparison operator can be used in outer joins.
SQL_ORDER_BY_COLUMNS_IN_SELECT (string)
Set to "Y" if columns in the ORDER BY clauses must be in the select list; otherwise set to "N".
SQL_OUTER_JOINS (string)
The character string:
  • "Y" indicates that outer joins are supported, and CLI supports the ODBC outer join request syntax.
  • "N" indicates tha touter joins are not supported.
SQL_PARAM_ARRAY_ROW_COUNTS (32-bit unsigned integer)
Indicates the availability of row counts in a parameterized execution:
  • SQL_PARC_BATCH : Individual row counts are available for each set of parameters. This behavior is conceptually equivalent to CLI generating a batch of SQL statements, one for each parameter set in the array. Extended error information can be retrieved by using the SQL_PARAM_STATUS_PTR descriptor field. To enable this behavior for non-atomic operations, set the SQL_ATTR_PARC_BATCH connection attribute to SQL_PARC_BATCH_ENABLE and SQL_ATTR_PARAMOPT_ATOMIC to SQL_ATOMIC_NO. If SQL_ATTR_PARAMOPT_ATOMIC is set to SQL_ATOMIC_YES, the CLI0150E error message is returned.
  • SQL_PARC_NO_BATCH : Only one row count is available, which is the cumulative row count resulting from the execution of the statement for the entire array of parameters. This behavior is conceptually equivalent to treating the statement along with the entire parameter array as one atomic unit. Errors are handled the same as if one statement was issued.
SQL_PARAM_ARRAY_SELECTS (32-bit unsigned integer)
Indicates the availability of result sets in a parameterized execution. Valid returned values are:
  • SQL_PAS_BATCH : One result set is available per set of parameters. The SQL_PAS_BATCH is conceptually equivalent to CLI generating a batch of SQL statements, one for each parameter set in the array.
  • SQL_PAS_NO_BATCH : Only one result set is available, which represents the cumulative result set resulting from the execution of the statement for the entire array of parameters. The SQL_PAS_NO_BATCH is conceptually equivalent to treating the statement along with the entire parameter array as one atomic unit.
  • SQL_PAS_NO_SELECT : CLI does not allow a result-set generating statement to be executed with an array of parameters.
SQL_POS_OPERATIONS (32-bit mask)
Reserved option, zero is returned for the bit-mask.
SQL_POSITIONED_STATEMENTS (32-bit mask)
Indicates the degree of support for positioned UPDATE and positioned DELETE statements:
  • SQL_PS_POSITIONED_DELETE
  • SQL_PS_POSITIONED_UPDATE
  • SQL_PS_SELECT_FOR_UPDATE - Indicates whether the server requires the FOR UPDATE clause to be specified on a <query expression> in order for a column to be updateable by using a cursor.
SQL_PROCEDURE_TERM (string)
The name a database vendor uses for a procedure
SQL_PROCEDURES (string)
A character string of "Y" indicates that the data source supports procedures and CLI supports the ODBC procedure invocation syntax specified by the CALL statement. "N" indicates that it does not.
SQL_QUOTED_IDENTIFIER_CASE (16-bit integer)
Valid returned values are:
  • SQL_IC_UPPER : Not case sensitive and are stored in uppercase.
  • SQL_IC_LOWER : Not case sensitive and are stored in lowercase.
  • SQL_IC_SENSITIVE : Quoted identifiers (delimited identifiers) in SQL are case sensitive and are stored in mixed case in the system catalog.
  • SQL_IC_MIXED - Not case sensitive and are stored in mixed case.

The SQL_QUOTED_ IDENTIFIER_CASE integer should be contrasted with the SQL_IDENTIFIER_CASE InfoType argument, which is used to determine how (unquoted) identifiers are stored in the system catalog.

SQL_ROW_UPDATES (string)
A character string of "Y" indicates a keyset-driven cursor or mixed cursor that maintains row versions or values for all fetched rows, and therefore can detect any updates made to a row since the row was last fetched. This character string only applies to updates, not to deletions or insertions. CLI can return the SQL_ROW_UPDATED flag to the row status array when SQLFetchScroll() is called. Otherwise, "N" is returned.
SQL_SCHEMA_TERM (string)
The terminology of the database vendor for a schema (owner).

In previous versions of CLI this InfoType was SQL_OWNER_TERM.

SQL_SCHEMA_USAGE (32-bit mask)
Indicates the type of SQL statements that have schema (owners) associated with them when these statements are executed. Valid returned schema qualifiers (owners) are:
  • SQL_SU_DML_STATEMENTS - All DML statements.
  • SQL_SU_PROCEDURE_INVOCATION - The procedure invocation statement.
  • SQL_SU_TABLE_DEFINITION - All table definition statements.
  • SQL_SU_INDEX_DEFINITION - All index definition statements.
  • SQL_SU_PRIVILEGE_DEFINITION - All privilege definition statements (grant and revoke statements).

In previous versions of CLI this InfoType argument was SQL_OWNER_USAGE.

SQL_SCROLL_CONCURRENCY (32-bit mask)
Indicates the concurrency options that are supported for the cursor.
The listed bit masks are used with the flag to determine which options are supported:
  • SQL_SCCO_LOCK
  • SQL_SCCO_READ_ONLY
  • SQL_SCCO_TIMESTAMP
  • SQL_SCCO_VALUES

CLI returns SQL_SCCO_LOCK, which indicates that the lowest level of locking that is sufficient to make an update.

SQL_SCROLL_OPTIONS (32-bit mask)
Indicates the scroll options that are supported for scrollable cursors.
The listed bit masks are used with the flag to determine which options are supported:
  • SQL_SO_FORWARD_ONLY : The cursor scrolls only forward.
  • SQL_SO_KEYSET_DRIVEN : CLI saves and uses the keys for every row in the result set.
  • SQL_SO_STATIC : The data in the result set is static.
  • SQL_SO_DYNAMIC : CLI keeps the keys for every row in the rowset (the keyset size is the same as the rowset size).
  • SQL_SO_MIXED : CLI keeps the keys for every row in the keyset, and the keyset size is greater than the rowset size. The cursor is keyset-driven inside the keyset and dynamic outside the keyset.
SQL_SEARCH_PATTERN_ESCAPE (string)
Used to specify what the driver supports as an escape character for catalog functions, such as the SQLTables() function, and the SQLColumns() function.
SQL_SERVER_NAME (string)
Indicates the name of the DB2 instance. In contrast to the SQL_DATA_SOURCE_NAME character string, this character string is the actual name of the database server. Some DBMSs provide a different name upon establishing a connection than the real server-name of the database.
SQL_SPECIAL_CHARACTERS (string)
A character string that contains only special characters (all characters except a...z, A...Z, 0...9, and underscore) that can be used in an identifier name, such as table, column, or index name, on the data source. For example, "@#". If an identifier contains special characters, the identifier must be a delimited identifier.
SQL_SQL_CONFORMANCE (32-bit unsigned integer)
Indicates the level of SQL-92 that is supported:
  • SQL_SC_SQL92_ENTRY : Entry level SQL-92 compliant.
  • SQL_SC_FIPS127_2_TRANSITIONAL : FIPS 127-2 transitional-level compliant.
  • SQL_SC_SQL92_FULL : Full-level SQL-92 compliant.
  • SQL_SC_ SQL92_INTERMEDIATE : Intermediate level SQL-92 compliant.
SQL_SQL92_DATETIME_FUNCTIONS (32-bit mask)
Indicates the datetime scalar functions that are supported by CLI and the data source. Valid returned values are:
  • SQL_SDF_CURRENT_DATE
  • SQL_SDF_CURRENT_TIME
  • SQL_SDF_CURRENT_TIMESTAMP
SQL_SQL92_FOREIGN_KEY_DELETE_RULE (32-bit mask)
Indicates the rules that are supported for a foreign key in a DELETE statement, as defined by SQL-92. Valid returned values are:
  • SQL_SFKD_CASCADE
  • SQL_SFKD_NO_ACTION
  • SQL_SFKD_SET_DEFAULT
  • SQL_SFKD_SET_NULL
SQL_SQL92_FOREIGN_KEY_UPDATE_RULE (32-bit mask)
Indicates the rules that are supported for a foreign key in an UPDATE statement, as defined by SQL-92. Valid returned values are:
  • SQL_SFKU_CASCADE
  • SQL_SFKU_NO_ACTION
  • SQL_SFKU_SET_DEFAULT
  • SQL_SFKU_SET_NULL
SQL_SQL92_GRANT (32-bit mask)
Indicates the clauses that are supported in a GRANT statement, as defined by SQL-92. Valid returned values are:
  • SQL_SG_DELETE_TABLE
  • SQL_SG_INSERT_COLUMN
  • SQL_SG_INSERT_TABLE
  • SQL_SG_REFERENCES_TABLE
  • SQL_SG_REFERENCES_COLUMN
  • SQL_SG_SELECT_TABLE
  • SQL_SG_UPDATE_COLUMN
  • SQL_SG_UPDATE_TABLE
  • SQL_SG_USAGE_ON_DOMAIN
  • SQL_SG_USAGE_ON_CHARACTER_SET
  • SQL_SG_USAGE_ON_COLLATION
  • SQL_SG_USAGE_ON_TRANSLATION
  • SQL_SG_WITH_GRANT_OPTION
SQL_SQL92_NUMERIC_VALUE_FUNCTIONS (32-bit mask)
Indicates the numeric value scalar functions that are supported by CLI and the data source, as defined in SQL-92. Valid returned values are:
  • SQL_SNVF_BIT_LENGTH
  • SQL_SNVF_CHAR_LENGTH
  • SQL_SNVF_CHARACTER_LENGTH
  • SQL_SNVF_EXTRACT
  • SQL_SNVF_OCTET_LENGTH
  • SQL_SNVF_POSITION
SQL_SQL92_PREDICATES (32-bit mask)
Indicates the predicates that are supported in a SELECT statement, as defined by SQL-92. Valid returned values are:
  • SQL_SP_BETWEEN
  • SQL_SP_COMPARISON
  • SQL_SP_EXISTS
  • SQL_SP_IN
  • SQL_SP_ISNOTNULL
  • SQL_SP_ISNULL
  • SQL_SP_LIKE
  • SQL_SP_MATCH_FULL
  • SQL_SP_MATCH_PARTIAL
  • SQL_SP_MATCH_UNIQUE_FULL
  • SQL_SP_MATCH_UNIQUE_PARTIAL
  • SQL_SP_OVERLAPS
  • SQL_SP_QUANTIFIED_COMPARISON
  • SQL_SP_UNIQUE
SQL_SQL92_RELATIONAL_JOIN_OPERATORS (32-bit mask)
Indicates the relational join operators that are supported in a SELECT statement, as defined by SQL-92. Valid returned values are:
  • SQL_SRJO_CORRESPONDING_CLAUSE
  • SQL_SRJO_CROSS_JOIN
  • SQL_SRJO_EXCEPT_JOIN
  • SQL_SRJO_FULL_OUTER_JOIN
  • SQL_SRJO_INNER_JOIN (indicates support for the INNER JOIN syntax, not for the inner join capability)
  • SQL_SRJO_INTERSECT_JOIN
  • SQL_SRJO_LEFT_OUTER_JOIN
  • SQL_SRJO_NATURAL_JOIN
  • SQL_SRJO_RIGHT_OUTER_JOIN
  • SQL_SRJO_UNION_JOIN
SQL_SQL92_REVOKE (32-bit mask)
Indicates which clauses the data source supports in the REVOKE statement, as defined by SQL-92. Valid returned values are:
  • SQL_SR_CASCADE
  • SQL_SR_DELETE_TABLE
  • SQL_SR_GRANT_OPTION_FOR
  • SQL_SR_INSERT_COLUMN
  • SQL_SR_INSERT_TABLE
  • SQL_SR_REFERENCES_COLUMN
  • SQL_SR_REFERENCES_TABLE
  • SQL_SR_RESTRICT
  • SQL_SR_SELECT_TABLE
  • SQL_SR_UPDATE_COLUMN
  • SQL_SR_UPDATE_TABLE
  • SQL_SR_USAGE_ON_DOMAIN
  • SQL_SR_USAGE_ON_CHARACTER_SET
  • SQL_SR_USAGE_ON_COLLATION
  • SQL_SR_USAGE_ON_TRANSLATION
SQL_SQL92_ROW_VALUE_CONSTRUCTOR (32-bit mask)
Indicates the row value constructor expressions that are supported in a SELECT statement, as defined by SQL-92. Valid returned values are:
  • SQL_SRVC_DEFAULT
  • SQL_SRVC_NULL
  • SQL_SRVC_ROW_SUBQUERY
  • SQL_SRVC_VALUE_EXPRESSION
SQL_SQL92_STRING_FUNCTIONS (32-bit mask)
Indicates the string scalar functions that are supported by CLI and the data source, as defined by SQL-92. Valid returned values are:
  • SQL_SSF_CONVERT
  • SQL_SSF_LOWER
  • SQL_SSF_SUBSTRING
  • SQL_SSF_TRANSLATE
  • SQL_SSF_TRIM_BOTH
  • SQL_SSF_TRIM_LEADING
  • SQL_SSF_TRIM_TRAILING
  • SQL_SSF_UPPER
SQL_SQL92_VALUE_EXPRESSIONS (32-bit mask)
Indicates the value expressions that are supported, as defined by SQL-92. Valid returned values are:
  • SQL_SVE_CASE
  • SQL_SVE_CAST
  • SQL_SVE_COALESCE
  • SQL_SVE_NULLIF
SQL_STANDARD_CLI_CONFORMANCE (32-bit mask)
Indicates the CLI standard or standards to which CLI conforms. Valid returned values are:
  • SQL_SCC_ISO92_CLI
  • SQL_SCC_XOPEN_CLI_VERSION1
SQL_STATIC_CURSOR_ATTRIBUTES1 (32-bit mask)
Indicates the attributes of a static cursor that are supported by CLI. Valid returned values are (subset 1 of 2):
  • SQL_CA1_ABSOLUTE
  • SQL_CA1_BOOKMARK
  • SQL_CA1_BULK_ADD
  • SQL_CA1_BULK_DELETE_BY_BOOKMARK
  • SQL_CA1_BULK_FETCH_BY_BOOKMARK
  • SQL_CA1_BULK_UPDATE_BY_BOOKMARK
  • SQL_CA1_LOCK_EXCLUSIVE
  • SQL_CA1_LOCK_NO_CHANGE
  • SQL_CA1_LOCK_UNLOCK
  • SQL_CA1_NEXT
  • SQL_CA1_POS_DELETE
  • SQL_CA1_POS_POSITION
  • SQL_CA1_POS_REFRESH
  • SQL_CA1_POS_UPDATE
  • SQL_CA1_POSITIONED_UPDATE
  • SQL_CA1_POSITIONED_DELETE
  • SQL_CA1_RELATIVE
  • SQL_CA1_SELECT_FOR_UPDATE
SQL_STATIC_CURSOR_ATTRIBUTES2 (32-bit mask)
Indicates the attributes of a static cursor that are supported by CLI. Valid returned values are (subset 2 of 2):
  • SQL_CA2_CRC_APPROXIMATE
  • SQL_CA2_CRC_EXACT
  • SQL_CA2_LOCK_CONCURRENCY
  • SQL_CA2_OPT_ROWVER_CONCURRENCY
  • SQL_CA2_OPT_VALUES_CONCURRENCY
  • SQL_CA2_MAX_ROWS_AFFECTS_ALL
  • SQL_CA2_MAX_ROWS_CATALOG
  • SQL_CA2_MAX_ROWS_DELETE
  • SQL_CA2_MAX_ROWS_INSERT
  • SQL_CA2_MAX_ROWS_SELECT
  • SQL_CA2_MAX_ROWS_UPDATE
  • SQL_CA2_READ_ONLY_CONCURRENCY
  • SQL_CA2_SENSITIVITY_ADDITIONS
  • SQL_CA2_SENSITIVITY_DELETIONS
  • SQL_CA2_SENSITIVITY_UPDATES
  • SQL_CA2_SIMULATE_NON_UNIQUE
  • SQL_CA2_SIMULATE_TRY_UNIQUE
  • SQL_CA2_SIMULATE_UNIQUE
SQL_STATIC_SENSITIVITY (32-bit mask)
Indicates whether changes that are made by an application with a positioned update or delete statement can be detected by that application. Valid returned values are:
  • SQL_SS_ADDITIONS : Added rows are visible to the cursor, and the cursor can scroll to these rows. All DB2 servers see added rows.
  • SQL_SS_DELETIONS : Deleted rows are no longer available to the cursor, and do not leave a hole in the result set. After the cursor scrolls from a deleted row, it cannot return to that row.
  • SQL_SS_UPDATES : Updated rows are visible to the cursor. If the cursor scrolls from and returns to an updated row, the data that is returned by the cursor is the updated data, not the original data.
SQL_STRING_FUNCTIONS (32-bit mask)
Indicates which string functions are supported.
The listed bit masks are used to determine which string functions are supported:
  • SQL_FN_STR_ASCII
  • SQL_FN_STR_BIT_LENGTH
  • SQL_FN_STR_CHAR
  • SQL_FN_STR_CHAR_LENGTH
  • SQL_FN_STR_CHARACTER_LENGTH
  • SQL_FN_STR_CONCAT
  • SQL_FN_STR_DIFFERENCE
  • SQL_FN_STR_INSERT
  • SQL_FN_STR_LCASE
  • SQL_FN_STR_LEFT
  • SQL_FN_STR_LENGTH
  • SQL_FN_STR_LOCATE
  • SQL_FN_STR_LOCATE_2
  • SQL_FN_STR_LTRIM
  • SQL_FN_STR_OCTET_LENGTH
  • SQL_FN_STR_POSITION
  • SQL_FN_STR_REPEAT
  • SQL_FN_STR_REPLACE
  • SQL_FN_STR_RIGHT
  • SQL_FN_STR_RTRIM
  • SQL_FN_STR_SOUNDEX
  • SQL_FN_STR_SPACE
  • SQL_FN_STR_SUBSTRING
  • SQL_FN_STR_UCASE

If an application can call the LOCATE scalar function with the string_exp1, string_exp2, and start arguments, the SQL_FN_STR_LOCATE bit mask is returned. If an application can call the LOCATE scalar function only with the string_exp1 and string_exp2, the SQL_FN_STR_LOCATE_2 bit mask is returned. If the LOCATE scalar function is fully supported, both bit masks are returned.

SQL_SUBQUERIES (32-bit mask)
Indicates which predicates support subqueries. Valid returned values are:
  • SQL_SQ_COMPARISION : The comparison predicate.
  • SQL_SQ_CORRELATE_SUBQUERIES : All predicates that support subqueries also support correlated subqueries.
  • SQL_SQ_EXISTS : The exists predicate.
  • SQL_SQ_IN : The in predicate.
  • SQL_SQ_QUANTIFIED : The predicates that contains a quantification scalar function.
SQL_SYSTEM_FUNCTIONS (32-bit mask)
Indicates which scalar system functions are supported.
The listed bit masks are used to determine which scalar system functions are supported:
  • SQL_FN_SYS_DBNAME
  • SQL_FN_SYS_IFNULL
  • SQL_FN_SYS_USERNAME
Note: These functions are intended to be used with the escape sequence in ODBC.
SQL_TABLE_TERM (string)
The terminology of a database vendor for a table.
SQL_TIMEDATE_ADD_INTERVALS (32-bit mask)
Indicates whether or not the special ODBC system function TIMESTAMPADD is supported, and, if it is, which intervals are supported.
The listed bit masks are used to determine which intervals are supported:
  • SQL_FN_TSI_FRAC_SECOND
  • SQL_FN_TSI_SECOND
  • SQL_FN_TSI_MINUTE
  • SQL_FN_TSI_HOUR
  • SQL_FN_TSI_DAY
  • SQL_FN_TSI_WEEK
  • SQL_FN_TSI_MONTH
  • SQL_FN_TSI_QUARTER
  • SQL_FN_TSI_YEAR
SQL_TIMEDATE_DIFF_INTERVALS (32-bit mask)
Indicates whether or not the special ODBC system function TIMESTAMPDIFF is supported, and, if it is, which intervals are supported.
The listed bit masks are used to determine which intervals are supported:
  • SQL_FN_TSI_FRAC_SECOND
  • SQL_FN_TSI_SECOND
  • SQL_FN_TSI_MINUTE
  • SQL_FN_TSI_HOUR
  • SQL_FN_TSI_DAY
  • SQL_FN_TSI_WEEK
  • SQL_FN_TSI_MONTH
  • SQL_FN_TSI_QUARTER
  • SQL_FN_TSI_YEAR
SQL_TIMEDATE_FUNCTIONS (32-bit mask)
Indicates which time and date functions are supported.
The listed bit masks are used to determine which date functions are supported:
  • SQL_FN_TD_CURRENT_DATE
  • SQL_FN_TD_CURRENT_TIME
  • SQL_FN_TD_CURRENT_TIMESTAMP
  • SQL_FN_TD_CURDATE
  • SQL_FN_TD_CURTIME
  • SQL_FN_TD_DAYNAME
  • SQL_FN_TD_DAYOFMONTH
  • SQL_FN_TD_DAYOFWEEK
  • SQL_FN_TD_DAYOFYEAR
  • SQL_FN_TD_EXTRACT
  • SQL_FN_TD_HOUR
  • SQL_FN_TD_JULIAN_DAY
  • SQL_FN_TD_MINUTE
  • SQL_FN_TD_MONTH
  • SQL_FN_TD_MONTHNAME
  • SQL_FN_TD_NOW
  • SQL_FN_TD_QUARTER
  • SQL_FN_TD_SECOND
  • SQL_FN_TD_SECONDS_SINCE_MIDNIGHT
  • SQL_FN_TD_TIMESTAMPADD
  • SQL_FN_TD_TIMESTAMPDIFF
  • SQL_FN_TD_WEEK
  • SQL_FN_TD_YEAR
Note: These functions are intended to be used with the escape sequence in ODBC.
SQL_TXN_CAPABLE (16-bit integer)
Indicates whether transactions can contain DDL, DML, or both. Valid returned values are:
  • SQL_TC_NONE : Transactions not supported.
  • SQL_TC_DML : Transactions can contain only DML statements (for example, SELECT, INSERT, UPDATE and DELETE). DDL statements, such as CREATE TABLE and DROP INDEX, that are encountered in a transaction cause an error.
  • SQL_TC_DDL_COMMIT : Transactions can only contain DML statements. DDL statements that are encountered in a transaction cause the transaction to be committed.
  • SQL_TC_DDL_IGNORE : Transactions can only contain DML statements. DDL statements that are encountered in a transaction are ignored.
  • SQL_TC_ALL : Transactions can contain DDL and DML statements in any order.
SQL_TXN_ISOLATION_OPTION (32-bit mask)
The transaction isolation levels that are available at the currently connected database server.
The listed masks are used in conjunction with the flag to determine which options are supported:
  • SQL_TXN_NOCOMMIT
  • SQL_TXN_READ_COMMITTED
  • SQL_TXN_READ_UNCOMMITTED
  • SQL_TXN_REPEATABLE_READ
  • SQL_TXN_SERIALIZABLE
  • SQL_TXN_VERSIONING

For descriptions of each level, see SQL_DEFAULT_TXN_ISOLATION.

SQL_UNION (32-bit mask)
Indicates if the server supports the UNION operator. Valid returned values are:
  • SQL_U_UNION : Supports the UNION clause.
  • SQL_U_UNION_ALL : Supports the ALL keyword in the UNION clause.

If SQL_U_UNION_ALL is set, so is SQL_U_UNION.

SQL_USER_NAME (string)
Indicates the user name that is used in a particular database. This character string is the identifier that is specified on the SQLConnect() call.
SQL_XOPEN_CLI_YEAR (string)
Indicates the year of publication of the X/Open specification with which the version of the driver fully complies.