Some working storage variables have additional attributes to be considered.
Temporary tables
Temporary tables were discussed in Chapter 2, Tables. Let's take a quick look at how one is defined. Defining a temporary table begins just like any other variable definition of the Record data type. To make it temporary, we add the temporary keyword after the table name, as shown in the following screenshot:
We can use a temporary table just as though it were a permanent table, with some specific differences:
- The table only contains the data we add to it during this instance of the object in which it resides.
- We cannot change any aspect of the definition of the table, except by changing the permanent table.
- Processing for a temporary table is done wholly in the client system, in a user-specific instance of the business logic. It is, therefore, inherently a single user.
- A properly utilized temporary table reduces network traffic and eliminates any locking...