I would like alter my table and add SPARSE
option to all fields that contain a lot of NULL values. What is the right syntax for this ALTER TABLE
command?
The other answers work, but you can also get away with:
ALTER TABLE #foo ALTER COLUMN bar ADD SPARSE;
This way you don't have to look up the column's type or nullability.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With