Using “OR” and “IN” with SQL Server’s Filtered Indexes
4 Comments
You can’t do everything with filtered indexes in SQL Server. For instance, you can’t create the following index: Transact-SQL CREATE INDEX IX_Votes_filter ON dbo.Votes (PostId) WHERE (VoteTypeId = 1 OR VoteTypeId = 2); GO 123 CREATE INDEX IX_Votes_filter ON dbo.Votes (PostId) WHERE (VoteTypeId = 1 OR VoteTypeId = 2);GO If you try, you’ll get the error…
Read More














