Vertica Quick Tip: A Truly Unique Constraint

Moderator: NorbertKrupa

Post Reply
User avatar
JimKnicely
Site Admin
Site Admin
Posts: 1811
Joined: Sat Jan 21, 2012 4:58 am
Contact:

Vertica Quick Tip: A Truly Unique Constraint

Post by JimKnicely » Mon Jan 29, 2018 4:50 pm

Vertica Community Blog post authored by Jim Knicely
According to the ANSI standards SQL:92, SQL:1999, and SQL:2003, a UNIQUE constraint should disallow duplicate non-NULL values, but allow multiple NULL values.

A Unique Constraint in Vertica does just that!

But what if I do not want to allow more than one NULL value? Well, there’s a simple trick for that!

Read about it here:
https://my.vertica.com/blog/vertica-qui ... onstraint/
Jim Knicely

Image

Note: I work for Vertica. My views, opinions, and thoughts expressed here do not represent those of my employer.

Post Reply

Return to “Vertica Links”