DB2 Connect User's Guide

DB2 Connect and SQL

DB2 Connect forwards SQL statements submitted by application programs to host or AS/400 database servers. DB2 Connect can forward almost any valid SQL statement. The exceptions are documented in Host or AS/400 Server SQL Statements Rejected by DB2 Connect.

Two types of embedded SQL processing exist: static SQL and dynamic SQL. Static SQL minimizes the time required to execute an SQL statement by processing in advance. Dynamic SQL is processed when the SQL statement is submitted to the host or AS/400 database server. Dynamic SQL is more flexible, but potentially slower. The decision to use static or dynamic SQL is made by the application programmer. Both are supported by DB2 Connect.

Different host or AS/400 database servers implement SQL differently. For more information about common SQL statements that are supported by all IBM systems, refer to the SQL Reference.

DB2 Connect fully supports the common IBM SQL, as well as the DB2 Universal Database for OS/390, DB2 for MVS/ESA, DB2 for VSE & VM (formerly SQL/DS), and DB2 Universal Database for AS/400 implementations of SQL. IBM SQL is strongly recommended for maintaining database independence. For more information, see Programming in a DB2 Connect Environment.


[ Top of Page | Previous Page | Next Page ]