Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

Numeric and Comparison Operators

Arithmetic and comparison operators work as expected in the common language runtime (CLR) except as follows:

  • SQL does not support the modulus operator on floating-point numbers.

  • SQL does not support unchecked arithmetic.

  • Increment and decrement operators cause side-effects when you use them in expressions that cannot be replicated in SQL and are, therefore, not supported.

LINQ to SQL supports the following operators.

  • Basic arithmetic operators:

    • +

    • - (subtraction)

    • *

    • /

    • Visual Basic integer division (\)

    • % (Visual Basic Mod)

    • <<

    • >>

    • - (unary negation)

  • Basic comparison operators:

    • Visual Basic = and C# ==

    • Visual Basic <> and C# !=

    • Visual Basic Is/IsNot

    • <

    • <=

    • >

    • >=

Show:
© 2015 Microsoft