# Conditions with AND or OR

You can combine simple conditions with the logical operators AND or OR to form complex conditions.

SELECTcustomer_num, order_dateFROMordersWHEREpaid_date > '1/1/97'ORpaid_dateISNULL;SELECTorder_num, total_priceFROMitemsWHEREtotal_price > 200.00ANDmanu_codeLIKE'HSELECTlname, customer_numFROMcustomerWHEREzipcodeBETWEEN'93500'AND'95700'ORstateNOTIN('CA', 'WA', 'OR');

`TRUE`

condition, F represents
a `FALSE`

condition, and the question mark (?) represents
an `UNKNOWN`

value. An `UNKNOWN `

value
can occur when part of an expression that uses a logical operator
is NULL. The marginal values at the left represent the first operand, and values in the top row represent the second operand. Values within each 3x3 matrix show the returned value after the operator is applied to operands of those values.

If the Boolean expression evaluates to `UNKNOWN`

,
the condition is not satisfied.

WHEREship_charge/ship_weight < 5ANDorder_num = 1023

The row where **order_num** = 1023 is a row where **ship_weight** is
NULL. Because **ship_weight** is NULL, **ship_charge**/**ship_weight** is
also NULL; therefore, the truth value of **ship_charge**/**ship_weight** <
5 is `UNKNOWN`

. Because **order_num** = 1023 is `TRUE`

,
the AND table states that the truth value of the entire condition
is `UNKNOWN`

. Consequently, that row is not chosen.
If the condition used an OR in place of the AND, the condition would
be `TRUE`

.