Database Reference
In-Depth Information
Example 53: The following example performs the same activity as the previous, but
here a PL/SQL procedure is used:
12.15 Dynamic Queries
Dynamic queries are used a lot in complex programming environments, where it is
either difficult or cumbersome to write a single SQL statement to correspond to each
request that the end user is likely to make. Instead of attempting this feat, the application
programmer or software engineer writes a sophisticated program (typically in a high
level language) which constructs or generates SQL statements that are pertinent to
the user request, and passes them on to an SQL parser. Three scenarios for this kind of
programming come readily to mind:
A sophisticated user needs to conduct ad-hoc queries on an
underlying database. The user is shielded from implementation
details of the database, but is aware of underlying base tables or
logical views, and the corresponding data fields (physical and/or
logical) that they contain. The user is allowed to determine what
details are to be included in his/her query.
 
Search WWH ::




Custom Search