Previous Topic

Next Topic

Book Contents

Book Index

Understanding Visual Where

Visual Where shows your Where statement in a visual format. The following examples will help you understand how this is displayed.

Example 1

WHERE LOCATION = '234'

AND MGRNO is not null

This Where statement has 2 conditions. The database will return rows for which both conditions are met.

Visual Where will show this visually as per the diagram below.

The database will test every row against the conditions in the Where statement

In this example:

Example 2

WHERE (LOCATION = '234' OR LOCATION = '123')

AND MGRNO is not null

This is similar to previous Where statement, except that there are two conditions on LOCATION. A row will be displayed if either LOCATION='234' or LOCATION='123' (and MGRNO is not null).

Visual Where will show this visually as below. There are now two routes that can be taken to the Result node. If the LOCATION='234' test fails, then LOCATION='123' offers another route through to Result.

Example 3

This is a more complex Where statement with many conditions. However the same rule applies as per with the previous examples - if there is a route through to Result then the row will be displayed, otherwise it will not.