Ben
Ben

Reputation: 6086

MySQL - index to support one or more values must not be NULL

Is it possible to create a MySQL index that drops records unless one of n fields is not null?

I know Multiple-Column Indexes exists but would this be possible?

Upvotes: 0

Views: 36

Answers (1)

Namphibian
Namphibian

Reputation: 12221

MySQL does not support filtered/conditional indexes. See this answer for more details: https://dba.stackexchange.com/questions/43/how-to-create-a-conditional-index-on-mysql

Upvotes: 1

Related Questions