Math Canonical Functions (Entity SQL)
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
|
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
|
These functions will return Null if given Null input.
Equivalent functionality is available in the Microsoft SQL Client Managed Provider. For more information, see .NET Framework Data Provider for SQL Server (SqlClient) for the Entity Framework Functions.