I have a stored procedure that creates some dynamic tables. If columnstore indexes are supported on the host version of SQL Server then I want to create a columnstore index, otherwise fallback to creating just a normal row store index.
I have found the dm_db_persisted_sku_features
table but that just tells you what non-standard features are currently being used rather than what is supported:
SELECT * FROM sys.dm_db_persisted_sku_features
How can I determine from inside a query if the SQL Server version and edition support columnstore indexes?