sql - Select a nullable bit with a default value -


I need to select a null qualified bit column in one view, but whenever the value is null, FALSE Use the default value. (For other reasons, I can not even add a default value to the source table.) This is what I am doing.

  CAST (case when bit_column IS is in the form of 0 bit bitmile and bit) bit_column, ...  

But I am thinking that there is a better / more efficient way to do this.

Isnull function.

  isnull (bit_column, 0)  

Comments

Popular posts from this blog

paypal - How to know the URL referrer in PHP? -

oauth - Facebook OAuth2 Logout does not remove fb_ cookie -

wpf - Line breaks and indenting for the XAML of a saved FlowDocument? -