Where (SQL) - Predicates

Predicates

Simple predicates use one of the operators =, <>, >, >=, <, <=, IN, BETWEEN, LIKE, IS NULL or IS NOT NULL.

Predicates can be enclosed in parentheses if desired. The keywords AND and OR can be used to combine two predicates into a new one. If multiple combinations are applied, parentheses can be used to group combinations to indicate the order of evaluation. Without parentheses, the AND operator has a stronger binding than OR.

The following example deletes rows from mytable where the value of mycol is greater than 100, and the value of item is equal to the string literal 'Hammer':

DELETE FROM mytable WHERE mycol > 100 AND item = 'Hammer'

Read more about this topic:  Where (SQL)

Famous quotes containing the word predicates:

    In the case of our main stock of well-worn predicates, I submit that the judgment of projectibility has derived from the habitual projection, rather than the habitual projection from the judgment of projectibility. The reason why only the right predicates happen so luckily to have become well entrenched is just that the well entrenched predicates have thereby become the right ones.
    Nelson Goodman (b. 1906)