# String Comparison Functions
+ **`STRCMP(str1, str2)`**: Compares **`str1`** and **`str2`** 
+ Return values: 
  + **`0`** indicates that **`str1`** and **`str2`** are the same 
  + **`-1`** means **`str1`** is less than **`str2`** 
  + **`1`** means **`str1`** is greater than **`str2`**
+ **`=`** tests whether strings are equal
 
```
tidb> SELECT STRCMP('ABC','ABc'), STRCMP('ABC','ABC'), STRCMP('ABc','ABC');
+---------------------+---------------------+---------------------+
| STRCMP('ABC','ABc') | STRCMP('ABC','ABC') | STRCMP('ABc','ABC') |
+---------------------+---------------------+---------------------+
|                  -1 |                   0 |                   1 |
+---------------------+---------------------+---------------------+
1 row in set (0.00 sec)

tidb> SELECT 'ABC' = 'ABC';
+---------------+
| 'ABC' = 'ABC' |
+---------------+
|             1 |
+---------------+
1 row in set (0.00 sec)
```

------------------------------------------------------------
```
tidb> SELECT STRCMP('ABC','ABc'), STRCMP('ABC','ABC'), STRCMP('ABc','ABC');
+---------------------+---------------------+---------------------+
| STRCMP('ABC','ABc') | STRCMP('ABC','ABC') | STRCMP('ABc','ABC') |
+---------------------+---------------------+---------------------+
| -1                  | 0                   | 1                   |
+---------------------+---------------------+---------------------+
1 row in set (0.00 sec)
tidb> SELECT 'ABC' = 'ABC';
+---------------+
| 'ABC' = 'ABC' |
+---------------+
| 1             |
+---------------+
1 row in set (0.00 sec)
```


