Using SQL Server 2014, I am trying to create a clustered columnstore index on a table which is referenced by a foreign key.

This is the syntax I am using

  ON dbo.Variant WITH (DROP_EXISTING = ON)

And I get this error

CREATE INDEX statement failed. A clustered columnstore index cannot be created over referencing column 'FK_Variant_Price' on table 'Variant'.

Any suggestions? I have looked online but cannot find anything.

  • 2
    What version are you using? SQL Server 2014 Columnstore does not allow you to have foreign keys or any constraints for that matter – Stijn Wynants Jun 8 '16 at 7:53
  • I am SQL 2014. Thanks for clarifying foreign key constraints restrictions. – Rizwan Jun 8 '16 at 14:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.