PostgreSQL multiple column UNIQUE constraints with NULLs are not UNIQUE
In PostgreSQL, when you define a uniqueness constraint on a set of columns, a NULL value in one or more of those columns is NOT considered to be duplicate/equal (thereby allowing duplicate values in the non-NULL columns).
This is per the SQL standard, however, is not true in all databases.
Written by S. Brent Faulkner
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Sql
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#