I need to make some mechanism that checks if a table X is columnstored or not and if it is not to convert it. I am aware that to convert a table X for example to clustered columnstore index we can use the following code:
CREATE CLUSTERED COLUMNSTORE INDEX MyColumnStoreIndex
ON Table_X
I would like to make a query that checks if a table contains columnstore index. Thanks in advance.