The STRCMP() compares string values that can be literal values or derived from expressions : STRCMP « String « SQL / MySQL






The STRCMP() compares string values that can be literal values or derived from expressions

    
mysql>
STRCMP(<expression1>, <expression2>)
mysql>
mysql> SELECT STRCMP('big', 'bigger');
+-------------------------+
| STRCMP('big', 'bigger') |
+-------------------------+
|                      -1 |
+-------------------------+
1 row in set (0.00 sec)

mysql>

   
    
    
    
  








Related examples in the same category

1.STRCMP( ) takes two string arguments and returns -1, 0, or 1, depending on whether the first string is lexical