ODBC and SQL-92 Scalar Functions
ODBC and SQL-92 classify their scalar functions differently. ODBC classifies
scalar functions by argument type; SQL-92 classifies them by return value. For
example, the EXTRACT function is classified as a timedate function by ODBC,
because the extract-field argument is a datetime keyword and the extract-source
argument is a datetime or interval expression. SQL-92, on the other hand,
classifies EXTRACT as a numeric scalar function, because the return value is a numeric.
An application can determine which scalar functions a driver supports by
calling SQLGetInfo. Information types are included for both ODBC and SQL-92 classifications of
scalar functions. Because these classifications are different, the support for
some scalar functions may be indicated in information types that do not
correspond for ODBC and SQL-92. For example, support for EXTRACT in ODBC is indicated
by the SQL_TIMEDATE_FUNCTIONS information type; support for EXTRACT in SQL-92,
on the other hand, is indicated by the SQL_SQL92_NUMERIC_VALUE_FUNCTIONS
information type.