Logical Operators
Using the LOGICAL OPERATORS Function
In this tutorial you will learn how to use the Logical Operators.
These are AND, OR, NOT, XOR
Create a simple table with the following values. We need each combination.
| A | B |
| TRUE | FALSE |
| FALSE | TRUE |
| TRUE | TRUE |
| FALSE | FALSE |
Query
Using a Query would be
SELECT [A] OR [B] AS myOR;
SELECT [A] AND [B] AS myAND;
SELECT NOT [A] myNOT;
SELECT [A] XOR [B] myXOR;
The Results
| myOR | myAND | myNOT | myXOR |
| -1 | 0 | 0 | -1 |
| -1 | 0 | -1 | -1 |
| -1 | -1 | 0 | 0 |
| 0 | 0 | -1 | 0 |
Courses
Access Expert 25
Search
You can find more about this by searching the website.
By: Alex Hedley
Click here to sign up for more FREE tips
|