Open Source RDBMS - Seamless, Scalable, Stable and Free

한국어 | Login |Register

Versions available for this page: CUBRID 8.3.0 |  CUBRID 8.3.1 |  CUBRID 8.4.0 |  CUBRID 8.4.1 |  CUBRID 8.4.3 |  CUBRID 9.0.0 | 



STRCMP Function

Description

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.

Syntax

STRCMP( string1 , string2 )

 

string :

character string

NULL

Example

SELECT STRCMP('abc', 'abc');

 

=======================

                      0

SELECT STRCMP ('acc', 'abc');

 

=======================

                      1

 

--STRCMP works case-insensitively

SELECT STRCMP ('ABC','abc');

 

=======================

                      0