There are many ways to conceptualize the job of a software programmer. One is that we sit around and play logic puzzles all day long—and get paid for it! Another is that we perform translation services between "normal people" and computers.
Yet another way to look at what we do is that we control the flow of data traffic between users and semiconductors. This is a very important job. If we let a chunk of data make a right turn when it should make a left turn—watch out! Someone could get fired when he or she should get promoted. A stock price could dive when it should rise slightly, and so on.
In this chapter I explore best practices related to the constructs that Oracle PL/SQL offers to control the flow of processing in your programs; these are presented in the following sections:
Presents best practices for using the IF and CASE statements.
Presents best practices for using FOR, WHILE, and simple loops.
Presents best practices for using the GOTO and CONTINUE statements.
These constructs are relatively straightforward in syntax and usage. There are, however, several best practices you should take into account when you work with these kinds of statements.
Follow the best practices in this section when you are using PL/SQL's IF and CASE statements. Ah, perhaps you didn't even know that PL/SQL ...