Топ-100
top of page
Волнистый абстрактный фон
CerebroSQL

STRCMP

База данных: MySQL

68747470733a2f2f7374796c65732e7265646469746d656469612e636f6d2f74355f32716d366b2f7374796c65

Topic

Syntax:
STRCMP(expr1,expr2)

STRCMP() returns 0 if the strings are the same, -1 if the first
argument is smaller than the second according to the current sort
order, and 1 otherwise.

URL: https://dev.mysql.com/doc/refman/8.0/en/string-comparison-functions.html

Example

mysql> SELECT STRCMP('text', 'text2');
-> -1
mysql> SELECT STRCMP('text2', 'text');
-> 1
mysql> SELECT STRCMP('text', 'text');
-> 0

bottom of page