I'm creating an index in a SQL Server table with ONLINE = ON
option:
CREATE INDEX IX_Name ON Users (Name) WITH ONLINE = ON
If this script is run on non-Enterprise SQL Server edition I get this error:
Online index operations can only be performed in Enterprise edition of SQL Server.
How to write a SQL script to use ONLINE = ON
option on Enterprise editions and not to use it for non-supported editions?