Database Reference
In-Depth Information
Embedded SQL was mentioned earlier in this chapter (see sections 12.1 and 12.2);
in fact, Examples 3 and 12 illustrate embedded SQL relating to data insertion and
transaction control respectively. The host language used here is Oracle's PL/SQL. The
general syntax for such queries is shown in Figure
12-14
, followed by illustrations in
Examples 51-53.
Figure 12-14.
Syntax for Embedded Query
Example 51:
The following examples illustrate two PL/SQL program block that each
retrieves a single row into program variables (the second more elegantly than the first):