Writing static SQL applications

For most DB2 users, static SQL provides a straightforward, efficient path to DB2 data. This section provides an overview of static SQL and describes the basic coding techniques for coding static SQL applications.

Overview of static SQL

The source form of a static SQL statement is embedded within an application program that is written in a traditional programming language such as C. The statement is prepared before the program is executed, and the operational form of the statement persists beyond the execution of the program. You can use static SQL when you know before run time what SQL statements your application needs to run.

When you use static SQL, you cannot change the form of SQL statements unless you make ...

Get Official Introduction to DB2® for z/OS®, The, 2nd Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.