null
-able columns in unique constraints (T591)The default null treatment of unique constraints is implementation defined. Note that nulls not distinct
unique constraints may still treat null
values as distinct from each other for rows where all constraint columns are null
.0
null
-able columns in unique constraints (T591)null
null
F292, “UNIQUE null treatment” is an optional feature in ISO/IEC 9075-2:2023. If first appeared in ISO/IEC 9075-2:2023.
Note that SQL:2016 specifies the behaviour of nulls distinct
as the only way to cope with null
values in unique constraints. In the mentioned draft the default behaviour is implementation defined.
You can’t catch up on 20 years of SQL evolution in one day. Subscribe the newsletter via E-Mail, Twitter or RSS to gradually catch up and to keep modern-sql.com on your radar.
The essence of SQL tuning in 200 pages
Buy now!
(paperback and/or PDF)
Paperback also available at Amazon.com.
Markus offers SQL training and consulting for developers working at companies of all sizes.
Learn more »
CD 9075-2:202x(E), 4.25.3.2 Unique constraints (in particular NOTE 52).