Monday, August 22, 2016

SQL Can BIT data type in SQL Server allows to insert NULL??

Don't get surprised with the answer but the answer is "Yes" :D, BIT data type allows NULL value to insert. As we know that BIT can store only 1's and 0's or True and False respectively, but when we don't specify the NULL check while we create a table, then system will automatically allows you to store the NULL Values. To avoid this, create  a column with condition that it should not allow the NULL values which means explicitly you are saying to system that, hey SQL don't store any null values in my column. 

No comments:

Post a Comment