Marking persisted computed columns NOT NULL in SQL Server Management Studio

You may cheat this with ISNULL(Price + Taxes, 0) which uses the default value 0 for NULL computations.


As Scoregraphic notes, you can do this with ISNULL.

I often use this for computed flags, e.g., in the User table, I have a DeletedDate to know when the account was deleted. I then create a computed non-nullable boolean column called IsDeleted (type bit) like this:

isnull(case when DeletedDate is null then 0 else 1 end, 0)

The important thing to note is that the ISNULL must be on the outermost part of the expression for the designer to realize it is a non-nullable computed column.