How to check if a column has been set as Sparse or not?
I know how to add the sparse while creating or altering tables
ALTER TABLE T1
ALTER COLUMN C1 VARCHAR(50) SPARSE NULL
GO
And it is possible to execute sparse query for the sparsed column. But not sure about any harms it may cause. just wondering is there any way to check is the column has been set as sparsed or not?
Basically, I am trying to create a script which will determine the compatibility level of sql server and if it supports Sparse then it will check "Is a column has already been sparsed or not" and if not then it required to alter the column and add sparse. It will be better if it is possible to determine the NULL percentage.