Syntax
STRCMP(expr1,expr2)
Purpose
Returns 0 if the strings expr1 and expr2 are the same. Returns -1 if expr1 is a substring of expr2. Returns 1 if expr2 is a substring of expr1.
Examples
obclient> SELECT STRCMP('text', 'text2');
+-------------------------+
| STRCMP('text', 'text2') |
+-------------------------+
| -1 |
+-------------------------+
1 row in set
obclient> SELECT STRCMP('text2', 'text');
+-------------------------+
| STRCMP('text2', 'text') |
+-------------------------+
| 1 |
+-------------------------+
1 row in set
obclient> SELECT STRCMP('text', 'text');
+------------------------+
| STRCMP('text', 'text') |
+------------------------+
| 0 |
+------------------------+
1 row in set
