16. Dynamic SQL
The embedded SQL that you have seen to this point is “static,” in that entire SQL commands have been specified within the source code. However, there are often times when you don't know exactly what a command should look like until a program is running.
Consider, for example, the screen in Figure 16-1. The user fills in the fields on which he or she wishes to base a search of the rare book store's holdings. When the user clicks a Search button, the application program managing the window checks the contents of the fields on the window and uses the data it finds to create a SQL query.
B9780123756978500169/f16-01-9780123756978.jpg is missing
Figure 16-1
A typical window for gathering information ...

Get SQL Clearly Explained, 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.