ODBC and JDBC Guide

Table Of Contents
Chapter 7
|
Supported standards 55
The following example shows the importance of precedence:
WHERE salary > 40000 OR hire_date > {d ‘2008/01/30’} AND dept = 'D101'
Because AND is evaluated first, this query retrieves employees in department D101 hired after January 30,
2008, as well as every employee making more than $40,000, no matter what department or hire date.
To force the clause to be evaluated in a different order, use parentheses to enclose the conditions to be
evaluated first. For example:
WHERE (salary > 40000 OR hire_date > {d ‘2008/01/30’}) AND dept = 'D101'
retrieves employees in department D101 that either make more than $40,000 or were hired after January 30, 2008.
ODBC Catalog functions
The ODBC client driver supports the following Catalog functions:
1 SQLTables - catalog information is stored and reported as single part names (table name only).
1 SQLColumns
1 SQLColumnPrivileges
1 SQLDescribeCol
1 SQLGetTypeInfo
JDBC Meta Data functions
The JDBC client driver supports the following Meta Data functions:
1 getColumns
1 getColumnPrivileges
1 getMetaData
1 getTypeInfo
1 getTables
1 getTableTypes
Reserved SQL keywords
The following table lists reserved keywords that should not be used as names for columns, tables, aliases,
or other user-defined objects. If you are getting syntax errors, these errors may be due to using one of these
reserved words. If you want to use one of these keywords, you need to use quotation marks to prevent the
word from being treated as a keyword.