Bug #74199 Create constraint key type UNIQUENULL to prohibit multiple null values
Submitted: 3 Oct 2014 0:42
Reporter: Marco Janc Email Updates:
Status: Open Impact on me:
None 
Category:MySQL Server Severity:S4 (Feature request)
Version:5.6 OS:Any
Assigned to: CPU Architecture:Any
Tags: column, constraint, null, unique

[3 Oct 2014 0:42] Marco Janc
Description:
By ANSI standards multiple null columns are permitted on UNIQUE constrained columns.

What about a new key type UNIQUENULL to prohibit multiple null values.

Not having such an option needs really annoying workarounds such as a non nullable helper column which sets replacement data for null values in trigger.

How to repeat:
Feature request, nothing to repeat.

Suggested fix:
Create UNIQUENULL key constraint