Chapter 14. Dynamic SQL Programming

In Chapter 13, “Using DB2 in an Application Program,” you learned about embedding static SQL into application programs to access DB2 tables; however, you can embed another type of SQL in an application program: dynamic SQL.

Static SQL is hard-coded, and only the values of host variables in predicates can change. Dynamic SQL is characterized by its capability to change columns, tables, and predicates during a program’s execution. This flexibility requires different techniques for embedding dynamic SQL in application programs. ...

Get DB2 Developer’s Guide: A Solutions-Oriented Approach to Learning the Foundation and Capabilities of DB2 for z/OS, Sixth Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.