The following examples show some relational-operator conditions:
city[1,3] = 'San' o.order_date > '6/12/98' WEEKDAY(paid_date) = WEEKDAY(CURRENT- (31 UNITS DAY)) YEAR(ship_date) < YEAR (TODAY) quantity <= 3 customer_num <> 105 customer_num != 105
If an expression within the condition has an UNKNOWN value because it references an uninitialized variable, the database server raises an exception.
If any expression within the condition evaluates to NULL, the condition cannot be true, unless you are explicitly testing for NULL by using the IS NULL operator. For example, if the paid_date column has a NULL value, then neither of the following statements can retrieve that row:
SELECT customer_num, order_date FROM orders WHERE paid_date = '' SELECT customer_num, order_date FROM orders WHERE NOT (paid_date !='')
The IS NULL operator tests for a NULL value, as the next example shows. The IS NULL operator is described in IS NULL Condition.
SELECT customer_num, order_date FROM orders WHERE paid_date IS NULLEnterprise Edition Home | Express Edition Home | [ Top of Page | Previous Page | Next Page | Contents | Index ]