Retrieving a Subset of Rows: Compound Conditions

The conditions illustrated in the previous section are called simple conditions because each involves a single comparison. It is also possible to develop more complex conditions involving two or more conditional expressions. You combine conditions using the logical operators AND, OR, or NOT to connect conditional expressions. When two or more conditions are combined by logical operators, the conditional expression is called a compound condition. For example, you may want a list of departments from the Product Division only with budgets under $20,000.

The form of the compound condition is:

     conditional   logical    conditional   logical    conditional
     expression1   operator   expression2   operator   expression3
As with simple conditional expressions, the evaluation of a compound condition is either true or false, with true resulting in retrieval of a row and false resulting in no retrieval.



Copyright © Thunderstone Software     Last updated: Tue Feb 21 13:46:30 EST 2017
Copyright © 2017 Thunderstone Software LLC. All rights reserved.