Hello I am adding a new column to my table
ALTER TABLE MyTable ADD Active AS CASE WHEN EndDate < getdate() then 0 ELSE 1 END
How can I set the column to be a bit? because by default it is an int32. What I tried is to use this
ALTER TABLE MyTable ADD Active BIT AS CASE WHEN EndDate < getdate() then 0 ELSE 1 END
because of some stackoverflow answers. However it seems is not a good aproach what I am doing.