STRCMP (Lakehouse v1)
Renvoie 0 si les chaînes sont identiques, -1 si le premier argument est inférieur au second, et 1 sinon.
Syntaxe Analyze
Section intitulée « Syntaxe Analyze »func.strcmp(<expr1> ,<expr2>)Exemples Analyze
Section intitulée « Exemples Analyze »func.strcmp('text', 'text2')┌──────────────────────────────┐│ func.strcmp('text', 'text2') │├──────────────────────────────┤│ -1 │└──────────────────────────────┘
func.strcmp('text2', 'text')┌──────────────────────────────┐│ func.strcmp('text2', 'text') │├──────────────────────────────┤│ 1 │└──────────────────────────────┘
func.strcmp('text', 'text')┌──────────────────────────────┐│ func.strcmp('text', 'text') │├──────────────────────────────┤│ 0 │└──────────────────────────────┘Syntaxe SQL
Section intitulée « Syntaxe SQL »STRCMP(<expr1> ,<expr2>)Arguments
Section intitulée « Arguments »| Arguments | Description |
|---|---|
<expr1> |
La chaîne. |
<expr2> |
La chaîne. |
Type de retour
Section intitulée « Type de retour »BIGINT
Exemples SQL
Section intitulée « Exemples SQL »SELECT STRCMP('text', 'text2');┌─────────────────────────┐│ STRCMP('text', 'text2') │├─────────────────────────┤│ -1 │└─────────────────────────┘
SELECT STRCMP('text2', 'text');┌─────────────────────────┐│ STRCMP('text2', 'text') │├─────────────────────────┤│ 1 │└─────────────────────────┘
SELECT STRCMP('text', 'text');┌────────────────────────┐│ STRCMP('text', 'text') │├────────────────────────┤│ 0 │└────────────────────────┘