ANSI-standard Null Handling (version 6.5)

The American National Standards Institute (ANSI) provides standards throughout the trade and communications industries to promote compatibility among products and establish common behavior in related products.

Microsoft SQL Server 6.5 complies with ANSI standards and retains backward compatibility with configuration options that can be switched on or off by using the SET statement. These options enforce data manipulation behavior for the duration of a user's work session or for the duration of a running trigger or a stored procedure.

These are the new configuration options.

Enabling options Description
SET ANSI_NULLS ON Specifies ANSI-standard behavior of the comparison operators, EQUAL (=) and NOT EQUAL (< >). ANSI-standards require that a null value in any statement evaluates to NULL. Default is OFF.
SET ANSI_WARNINGS ON Specifies warnings are generated when null values appear in aggregate functions when data is truncated during an update or when arithmetic overflows occur. Default is OFF.
SET ANSI_PADDING ON In varchar and varbinary columns, trailing spaces and NULLS are not deleted. When this option is set to OFF, trailing spaces and NULLS are deleted in these columns. Default is OFF.
SET ANSI_DEFAULTS ON Turns on all ANSI-standard behaviors. This option includes setting to ON these options: ANSI_NULLS, ANSI_NULL_DFLT_ON, ANSI_PADDING, ANSI_WARNINGS, ARITHABORT, CURSOR_CLOSE_ON_COMMIT, IMPLICIT_TRANSACTIONS, and QUOTED_IDENTIFIER. Default is OFF.

For information about the SET statement, comparison operators, and aggregate functions, see SET Statement.