DBMS and SpreadsheetsMath, Comparison, and Logical Operator SymbolsMath operator symbolsMath operator symbols indicate what operations are to be performed when evaluating an arithmetic expression such as X / Y * (A + B * A). Symbols
Order of PrecedenceWhen evaluating a mathamatical or logical expression, expressions contained within parenthesis are always evaluated first. The order of precedence for the remaining math operators is from left to right in the following order:
The following phrase makes it easy to remember the order of Precedence
for the mathematical operators:
String operation symbolsString operation symbols indicate how two or more character strings
are combined, an operation known as concatenation.
Example (_'s represent blank spaces)
Comparison operator symbolsComparison operators are used to make comparisons between math,
character, or date expressions. They result in the logical values
True or False, as used with boolian logic.
Logical operator symbolsLogical operators (sometimes called Boolean operators) are used in
logical (or Boolean) expressions. (Example: (A .AND. B .OR. C) ).
Just as in mathematical expressions, there is a specific order of precedence for evaluating logical expressions which have more than two operators. Expressions inside of parentheses are evaluated first, and the logical operators are evaluated in the following order:
Example: the parentheses in the following example make the two statements logically different:
The following Truth Table provides all the rules needed to evaluate logical expressions. Truth Table
The AND and OR columns of a truth table can be summarized as follows:
Bruce Miller, 2005 |