This site will look much better in a browser that supports web standards, but it is accessible to any browser or Internet device.
To control the evaluation process of a more "complicated" SQL request.
3 x 4 + 1 = 13
3 x (4+1) = 15
(3 x (4+1)) = 15
The selection of data from a database is based on the order of the request and the joining statements used. Joining statements are And and Or. The information presented in the box below may help in evaluating requests in deciding whether to use an And statement or an Or statement.
Truth Tables |
|
| And | Or |
| T and T = True | T or T = True |
| T and F = False | T or F = True |
| F and T = False | F or T = True |
| F and F = False | F or F = False |
Gender = M And Age = 10
Gender = M Or Age = 10
When using And statements, all criteria linked by And must be true in order to return the requested information. When using Or statements, only one criteria linked by Or must be true to return the requested information.
A report of all the 10-, 11-, and 12-year old girls in the market beef project is needed.
The exact information is available without worrying about the proper order. Remember, the key to grouping within parentheses is to use them to group "like information" to select specific records.
Don't worry too much about getting the correct number of parentheses. Code has been included in this software that adds the correct number of closing parentheses when the Process button is clicked.
All simple requests can still be entered without parentheses just as in the past. But, the addition of this feature makes it literally impossible to not find a way to get the information out of the system provided the data has been entered to begin with!
Ed. 2001 Reviewed 11/2005
[top]
•
Updated 09/14/2006
Indexes
A-Z Index
Subject Index
University of Wyoming
Department 3354
1000 E. University Ave.
Laramie, WY 82071
(307)766-3702
e-mail: