A UNIQUE index can have any number of columns, so you can create an index with 
all of the appropriate columns listed.  This is different from having a UNIQUE 
index on each individual column.  In the former case, all of the columns 
together must be unique; in the latter case, as you mention, each index is 
evaluated separately.

> On Jul 9, 2023, at 15:58, p...@pfortin.com wrote:
> 
> Hi,
> 
> Trying to figure out how to insert new property addresses into an
> existing table.
> 
> Can a UNIQUE constraint be applied to an entire row?  Adding UNIQUE to
> each column won't work in such a case since there are multiple properties
> * on the same street
> * in the same town
> * with the same number on different streets
> * etc...
> 
> Each row is only unique as an entity; but the columns are not...  
> 
> Is this covered in the docs?
> 
> Thanks,
> Pierre
> 
> 
> 



Reply via email to