Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Entity SQL includes math canonical functions.
The following table shows the math Entity SQL canonical functions.
Function | Description |
---|---|
Abs(value) |
Returns the absolute value of value. Arguments An Int16, Int32, Int64, Byte, Single, Double, and Decimal. Return Value The type of value. Example
|
Ceiling(value) |
Returns the smallest integer that is not less than value. Arguments A Single, Double, and Decimal. Return Value The type of value. Example
|
Floor(value) |
Returns the largest integer that is not greater than value. Arguments A Single, Double, and Decimal. Return Value The type of value. Example
|
Power(value, exponent) |
Returns the result of the specified value to the specified exponent. Arguments value: An Int32, Int64, Double, or Decimal. exponent: An Int64, Double, or Decimal. Return Value The type of value. Example
|
Round(value) |
Returns the integer portion of value, rounded to the nearest integer. Arguments A Single, Double, and Decimal. Return Value The type of value. Example
|
Round(value, digits) |
Returns the value, rounded to the nearest specified digits. Arguments value: Double or Decimal. digits: Int16 or Int32. Return Value The type of value. Example
|
Truncate(value, digits) |
Returns the value, truncated to the nearest specified digits. Arguments value: Double or Decimal. digits: Int16 or Int32. Return Value The type of value. Example
|
These functions will return null if given null input.
Equivalent functionality is available in the Microsoft SQL Client Managed Provider. For more information, see SqlClient for Entity Framework Functions.