Conditional judgment notation:
when performing actions on a daily record, judge the conditions that are restricted-----
operator :
= <> (mismatch check) ! = < > <= >=
Example: Products not produced by supplier 1003 Where vend_id<>1003
and two both meet
OR Two conditions in which one can be satisfied
Note: You should pay attention to the priority of both and and or when using And>or
For example: List all products priced at more than $10 and manufactured by 1002 or 1003?
Where vend_id=1002 or vend_id=1003 and prod_price>=10; This error
Where (vend_id=1002 or vend_id=1003) and prod_price>=10;
between and
Prices for all products between $5 and $10
WHERE Prod_price between 5 and 10;
Like '%_ City% '
Percent percent (% )--any character, any number of occurrences,
Can be used anywhere in search mode, or multiple wildcard characters can be used
For example: Any word that begins with jet where prod_name like ' jet% ';
Underline (_)--match only a single character
Where prod_name like ' _ton anvil ';
In () within the range
Not in () out of range
Is null empty
Common Criteria for SQL statement judgment