For more about implicit versus embedded SQL code, see SQL data access.
get myCustomer with #sql{
SELECT customer_name
FROM Customer
WHERE customer_number = :myCustomer.customerNumber };
An initial colon character indicates a host variable (a variable defined in the language hosting SQL, in this case, EGL), for example, :myCustomer.customerNumber.
You can convert implicit SQL code to embedded code and then modify it; for more information, see the EGL Programmer's Guide.
get myCustomer usingKeys myCustomer.customerName with #sql{
SELECT customer_name
FROM Customer
WHERE customer_number = :myOrders.customerNumber };
The
first key field is that specified in the record prototype, CustomerRecord
(myCustomer.customerNumber). The usingKeys clause
overrides this default key with myCustomer.customerName in
the implicit SQL code that EGL generates when there is not embedded
code as well. That embedded code overrides the implicit code and uses myOrders.CustomerNumber as
the actual key to read from the database.