Name | Comparison Operators | ||||
Python/Java/C/C# | Javascript | PHP | SQL | Powershell | |
Equal to | == | == | == | = | -eq |
Greater than | > | > | > | > | -gt |
Less than | < | < | < | < | -lt |
Greater than or Equal to | >= | >= | >= | >= | -ge |
Less than or Equal to | <= | <= | <= | <= | -le |
Not Equal to | != | != | != | <> | -ne |
Identical | === | ||||
Not Identical | !== | ||||
Spaceship | <=> | ||||
Equal value and equal type | === | ||||
Not equal value or not equal type | !== | ||||
Wildcard Comparison | -like | ||||
Wildcard Comparison | -notlike | ||||
Regular Expression Comparison | -match | ||||
Regular Expression Comparison | -notmatch | ||||
Replace Operator | -replace | ||||
Containment operator | -contains | ||||
Containment operator | -notcontains | ||||
Like –contains, but with the operands reversed.(PowerShell 3.0) | -in | ||||
Like –notcontains, but with the operands reversed.(PowerShell 3.0) | -notin | ||||
Matches a value in a list | IN() | ||||
Negates a condition | NOT | ||||
Within a range (inclusive) | BETWEEN | ||||
NULL Value | IS NULL | ||||
Not-NULL Value | IS NOT NULL | ||||
Pattern matching with % and _ | LIKE | ||||
Condition is met if subquery returns at least one row | EXISTS |
Leave a Reply