# Selection
+ Expressions in **`[WHERE {condition}]`** can use following types of operator:
  + Arithmetic: **`+`**, **`-`**, **`/`**, **`DIV`**, **`%`**, **`MOD`**, **`*`** 
  + Compare: **`<`**, **`<=`**, **`=`**, **`<=>`**,**`<>`**, **`!=`**, **`>=`**, **`>`**, **`BETWEEN AND`**
  + Logic: **`AND`**, **`OR`**, **`XOR`**, **`NOT`**
  + Other options: **`IN`**, **`IS NULL`**, **`LIKE`**, **`( )`**

------------------------------------------------------------
DIV: Integer division. Discards from the division result any fractional part to the right of the decimal point.
```
tidb:4000> SELECT 5.2 DIV 2, -5.2 DIV 2, 5 DIV 1.6, 5 DIV -1.6;

+-----------+------------+-----------+------------+
| 5.2 DIV 2 | -5.2 DIV 2 | 5 DIV 1.6 | 5 DIV -1.6 |
+-----------+------------+-----------+------------+
|         2 |         -2 |         3 |         -3 |
+-----------+------------+-----------+------------+
1 row in set (0.00 sec)
```

% and MOD are the same

<=> is NULL safe equal. <> and != are the same
```
tidb:4000> SELECT NULL = NULL, NULL != NULL, NULL = 1, NULL != 1, NULL <=> NULL, NULL <=> 1, NULL != 1, NULL <> 1;
+-------------+--------------+----------+-----------+---------------+------------+-----------+-----------+
| NULL = NULL | NULL != NULL | NULL = 1 | NULL != 1 | NULL <=> NULL | NULL <=> 1 | NULL != 1 | NULL <> 1 |
+-------------+--------------+----------+-----------+---------------+------------+-----------+-----------+
|        NULL |         NULL |     NULL |      NULL |             1 |          0 |      NULL |      NULL |
+-------------+--------------+----------+-----------+---------------+------------+-----------+-----------+
1 row in set (0.00 sec)
```

XOR is exclusive or. Gives output as 1 (True) when inputs differ. Returns NULL if either operand is NULL. 
```
tidb:4000> SELECT 1 XOR 1, 1 XOR 0, 1 XOR NULL, 1 XOR 1 XOR 1;
+---------+---------+------------+---------------+
| 1 XOR 1 | 1 XOR 0 | 1 XOR NULL | 1 XOR 1 XOR 1 |
+---------+---------+------------+---------------+
|       0 |       1 |       NULL |             1 |
+---------+---------+------------+---------------+
1 row in set (0.00 sec)
```



- `WHERE {where_condition}`
  - The `WHERE` clause is used to set the filter conditions, and only the data that meets the conditions will be included in the query results.
