Logo

SQL Server EVEN Function

Updated 2023-10-13 20:11:07.843000

Description

Use the scalar function EVEN to calculate a number rounded up to the nearest even integer.

Syntax

SELECT [westclintech].[wct].[EVEN] (
   <@Number, float,>)

Arguments

@Number

is the value to round. @Number is an expression of type float or of a type that can be implicitly converted to float.

Return Type

float

Remarks

The term rounding up always means rounding away from zero

Examples

SELECT wct.EVEN(-1.1);

Here is the result set.

column 1
-2