Comparison Operators (Entity SQL)
Comparison operators are defined for the following types: Byte, Int32, Int16, Int64, Double, Single, Decimal, String, DateTime, Date, Time, DateTimeOffset. Implicit type promotion occurs for the operands before the comparison operator is applied. Comparison operators always yield Boolean values. When at least one of the operands is null, the result is null.
Equality and inequality are defined for any object type that has identity, such as the Boolean type. Non-primitive objects with identity are considered equal if they share the same identity.
The following table lists the Entity SQL comparison operators.
Operator | Description |
---|---|
Compares the equality of two expressions. |
|
Compares two expressions to determine whether the left expression has a value greater than the right expression. |
|
Compares two expressions to determine whether the left expression has a value greater than or equal to the right expression. |
|
Determines if a query expression is null. |
|
Compares two expressions to determine whether the left expression has a value less than the right expression. |
|
Compares two expressions to determine whether the left expression has a value less than or equal to the right expression. |
|
Determines whether an expression results in a value in a specified range. |
|
Compares two expressions to determine whether the left expression is not equal to the right expression. |
|
Compares two expressions to determine whether the left expression is not equal to the right expression. |
|
Determines whether a specific character string matches a specified pattern. |
See Also
Concepts
Operators (Entity SQL)
Operator Precedence (Entity SQL)
Entity SQL Reference