title: How to allow in the field with a unique constraint to enter a lot of null values in SQL CE
body: <pre><code>create table test3
  (
  id int PRIMARY KEY,
  id2 int
  );
  
  create unique index ndx_id2 on test3 (id2);
  </code></pre>
  
  <p>For the purposes of unique indices, all <code>NULL</code> values are considered to different from all other <code>NULL</code> values and are thus unique. This is one of the two possible interpretations of the SQL-92 standard (the language in the standard is ambiguous) and is the interpretation followed by PostgreSQL, MySQL, Firebird, and Oracle. </p>
  
  <p>Informix and Microsoft SQL Server follow the other interpretation of the standard.</p>
  
  <pre><code>INSERT INTO test3(id, id2) VALUES (1, null);
  INSERT INTO test3(id, id2) VALUES (2, null);
  </code></pre>
  
  <p>Second INSERT returns </p>
  
  <blockquote>
    <p>A duplicate value cannot be inserted into a unique index. [ Table name
    = test3,Constraint name = ndx_id2 ]</p>
  </blockquote>
  
  <p>Error in SQL CE but successfully adds record to another DBMS, Sqlite for example.</p>
  
  <p>How to allow in the field with a unique constraint to enter a lot of null values ​​in SQL CE?</p>
  
  <p>P.S. This problem resolved for Sql 2008 <a href="https://stackoverflow.com/questions/15852103/how-to-allow-in-the-field-with-a-unique-constraint-to-enter-a-lot-of-null-values">How to allow in the field with a unique constraint to enter a lot of null values ​​in SQL Server</a> but need decision for SQL CE</p>