DB2 Connect and SQL statements


DB2 Connect™ forwards SQL statements submitted by application programs to host or System i™ database servers.

DB2 Connect can forward almost any valid SQL statement, as well as the supported DB2® APIs (application programming interfaces):

Embedded SQL support

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 System i 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 types are supported by DB2 Connect.

Different host or System i database servers implement SQL differently. DB2 Connect fully supports the common IBM® SQL, as well as the DB2 for OS/390® and z/OS®, DB2 Server for VSE & VM (formerly SQL/DS™), and DB2 for System i implementations of SQL. IBM SQL is strongly recommended for maintaining database independence.

Parent topic: DB2 Connect