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