I am a technical copywriter currently writing a fact sheet for a software company providing DB2 SQL support. They have something they want to call “limited dynamic SQL.”
Here’s a description:
- Flexible SQL lets developers add SQL text strings to SQL statements. With “Limited Dynamic SQL”, natural host variables can also be added. These variables are set by the program dynamically and interpreted at runtime.
Is this an appropriate term? (The people who came up with the term are German.)
That is the sum of my understanding of what dynamic SQL does. It allows a third- or fourth-generation language to use SQL in line in its code, and keeps placeholder variables in the host language to accept the results of the query.
Host variables (usually signified by a preceding colon, as in “:MyVar”) are placeholders for the results of a prepared SQL query.
The application sets up a query string and sends it to the server (PREPARE). The statement is then parsed, compiled, and made ready for execution.
This gives the application the advantage of a compiled parameterized procedure to run, which is quicker than if it were not prepared. When the statement returns, the host variables hold the data.
With that said, I do not see the limitation in the vendor’s implementation of dynamic SQL, since what you describe is the essence of using SQL in some other procedural language.