Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unique indexes should allow multiple NULL values to adhere to ANSI standard #24

Open
bummzack opened this issue Jun 19, 2015 · 0 comments

Comments

@bummzack
Copy link

It looks like unique indexes on MsSQL don't allow multiple NULL values. Since SilverStripe enforces ANSI compatibility, multiple NULL values on unique indexes should be allowed.

According to this answer on Stackoverflow, indexes should be defined as follows:

CREATE UNIQUE NONCLUSTERED INDEX idx_yourcolumn_notnull
ON YourTable(yourcolumn)
WHERE yourcolumn IS NOT NULL;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant