Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Unique constraint and NULL values

Re: Unique constraint and NULL values

From: David Portas <REMOVE_BEFORE_REPLYING_dportas_at_acm.org>
Date: Sat, 30 Oct 2004 08:56:48 +0100
Message-ID: <GdKdnb6ZBdDY1B7cRVn-3w@giganews.com>


In "Expert One-on-One Oracle.", p38, Tom Kyte gives the example described and says "SQL Server supports the ANSI method of Null comparison, just not by default". This statement is correct, although most SQL installations (since v7.0) now use the ODBC or OLEDB interface and the ANSI-compliant option is usually turned ON by default in the connection. That means that most users and applications actually get the ANSI standard behaviour for NULL comparisons by default.

However, the ANSI compliant setting does NOT affect the behaviour of unique constraints / indexes in SQL Server. NULL is always treated as equal to NULL by unique constraints and indexes.

-- 
David Portas
SQL Server MVP
--
Received on Sat Oct 30 2004 - 02:56:48 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US