The STRCMP function compares two strings, string1 and string2, and returns 0 if they are identical, 1 if string1 is greater, or -1 if string1 is smaller. If any of the parameters is NULL, NULL is returned.
STRCMP( string1 , string2 )
string :
• character string
• NULL
SELECT STRCMP('abc', 'abc');
=======================
0
SELECT STRCMP ('acc', 'abc');
=======================
1
--STRCMP works case-insensitively
SELECT STRCMP ('ABC','abc');
=======================
0