Koen Verbeeck (11/8/2016)
Somehow completely missed that the data type was bit.
Moar caffeine needed!
Ok maybe the defaulting of the bit field to 'false' is a little "bit" tricky. Part of the whole question is showing that this is possible and to look out for these things 🙂
No, that wasn't tricky really, as defaults only take effect when an insert or update doesn't specify the content of the column, and here the content is specified because the case statement provides content for that column in every row affected by the update, so the only question is what content does the case statement provide for the columns of interest.
Unless, of course, someone imagines that a default constraint substitutes the default value for a specified NULL, which is about on a par with failing Jeff's favourite interview question.