ROUND_TO_EVEN Option

Controls behavior of the SQL function ROUND.

Allowed Values

ON, OFF

Default

OFF

Scope

Requires the SET ANY SYSTEM OPTION system privilege. Can be set for the PUBLIC role only. Takes effect immediately.

Description

When ROUND_TO_EVEN option is set to ON, the ROUND function rounds half to the nearest even number. When the option is set to OFF, the ROUND function rounds SAP Sybase IQ half away from zero.

Sybase Control Center and Interactive SQL automatically turn the ROUND_TO_EVEN option OFF.

Example 1

The ROUND function returns a different value based on whether ROUND_TO_EVEN is ON or OFF.

When ROUND_TO_EVEN is set ON, SELECT ROUND (convert(double, 0.25), 1) from iq_dummy returns 0.2.

When ROUND_TO_EVEN is set OFF, SELECT ROUND (convert(double, 0.25), 1) from iq_dummy returns 0.3.