Comparison operators enable you to determine the relationship between two operands.
When both operands are strings, the comparison is performed lexicographically. The comparison results in a Boolean value. For the following comparison operators, automatic type conversions are performed, if necessary.
| Operator | Name | Value |
| = = | Equal to |
Checks for equality between two arguments performing type
conversion when necessary: |
| != | Not equal to | Inverse of = =. |
| > | Greater than |
Checks if first operand is greater than second |
| < | Smaller than |
Checks if first operand is smaller than second |
| >= | Greater than or equal to |
Checks if first operand is greater or equal to second |
| <= | Smaller than or equal to |
Checks if first operand is smaller or equal to second |
For the following two operators, automatic type conversions are not performed and, therefore, both the types and the values are compared.
| Operator | Name | Value |
| = = = | Identical to |
Same as == but the types of the operands have to match. No
automatic type conversions are performed: |
| != = | Not identical to | The inverse of = = =. |