SQL limitations at dissimilar servers
When you execute SQL statements on a remote server that is running another Db2 family product, certain limitations exist. Generally, a program that uses DRDA access can use SQL statements and clauses that are supported by a remote server, even if they are not supported by the local server.
- They support SELECT, INSERT, UPDATE, DELETE, DECLARE CURSOR, and
FETCH, but details vary.
Example: Db2 for Linux®, UNIX, and Windows and Db2 for i support a form of INSERT that allows for multiple rows of input data. In this case, the VALUES clause is followed by multiple lists in parentheses. Each list represents the values to be inserted for a row of data. Db2 for z/OS® does not support this form of INSERT.
- Data definition statements vary more widely.
Example: Db2 for z/OS supports ROWID columns; Db2 for Linux, UNIX, and Windows does not support ROWID columns. Any data definition statements that use ROWID columns cannot run across all platforms.
- Statements can have different limits.
Example: A query in Db2 for z/OS can have 750 columns; for other systems, the maximum is higher. But a query using 750 or fewer columns could execute in all systems.
- Some statements are not sent to the server but are processed completely by the requester. You cannot use those statements in a remote package even though the server supports them.
- In general, if a statement to be executed at a remote server contains host variables, a Db2 requester assumes them to be input host variables unless it supports the syntax of the statement and can determine otherwise. If the assumption is not valid, the server rejects the statement.