Executing SQL

This section provides a brief overview of the different ways to execute SQL from an application and shows you how to run your SQL statements interactively.

Methods of executing SQL

The method of preparing an SQL statement for execution and the persistence of its operational form distinguish static SQL from dynamic SQL.

Static SQL

The source form of a static SQL statement is embedded within an application program that is written in a host 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.

Dynamic SQL ...

Get Official Introduction to DB2® for z/OS®, The, 2nd 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.