Is it possible to create a filtered index in SQL Server with multiple conditions?
Here is what I am trying to do, but gives 'incorrect syntax' error:
CREATE UNIQUE NONCLUSTERED INDEX IX_TestTable
ON TestTable(MyIntColumn)
WHERE MyIntColumn is not null OR MyIntColumn<>0
OR
is not allowed, onlyAND
. Your condition makes little sense becauseMyIntColumn <> 0
impliesMyIntColumn IS NOT NULL
. – Dotation