This chapter explains dynamic SQL, an advanced methodology that lets users of Embedded SQL applications enter SQL statements while the application is running. While static SQL will suffice for most of your needs, dynamic SQL provides the flexibility to build diverse SQL statements at runtime.
Dynamic SQL is a set of Embedded SQL statements that permit users of online applications to access the database interactively at application runtime.
Use dynamic SQL when one or more of the following conditions is not known until runtime:
SQL statement the user will execute
Column, index, and table references
Number of host variables, or their datatypes