Here's the problem

IDX_COL1  IDX_COL_2
null      value1
null      value1

This does not violate a uniqueness constraint in H2.  NULL is considered a 
unique value.  Does this match the semantics of any other DBMS?

On Tuesday, March 27, 2018 at 10:21:23 PM UTC-7, Evgenij Ryazanov wrote:
>
> On Wednesday, 28 March 2018 00:11:29 UTC+8, Wes Clark wrote:
>>
>> We switched to Oracle mode so that unique indexes could allow multiple 
>> null values.  Is there a way to preserve that and still use the H2 date 
>> datatype?
>>
>
> In regular mode unique indexes allow multiple rows with NULL values too. 
> They are forbidden only in HSQLDB, Derby, and MSSQLServer modes.
>
> But if you use multi-column indexes there is a difference between regular 
> and Oracle mode.
>
> In Oracle mode only rows with NULL values in all indexed columns may be 
> duplicated.
> IDX_COL1  IDX_COL2
> null      null
> null      null
>
> In regular mode rows with NULL value in any indexed column may be 
> duplicated.
> IDX_COL1  IDX_COL_2
> null      null
> null      null
> null      value1
> null      value2
> value3    null
> value4    null
>
>

-- 
You received this message because you are subscribed to the Google Groups "H2 
Database" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to h2-database+unsubscr...@googlegroups.com.
To post to this group, send email to h2-database@googlegroups.com.
Visit this group at https://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.

Reply via email to