IBM Books

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.

There are two types of SQL processing: static SQL and dynamic SQL. Static SQL minimizes the time required to execute an SQL statement by processing it ahead of time. Dynamic SQL is processed when the SQL statement is submitted to the host or AS/400 database server. This makes dynamic SQL 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 information about common SQL statements that are supported by all IBM systems, see 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 | Table of Contents | Index ]

[ DB2 List of Books | Search the DB2 Books ]