Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
sqlfresher2k7
Aged Yak Warrior
623 Posts |
Posted - 2009-04-30 : 11:47:23
|
Can bit take Null value? If yes, in what sceniarios . |
|
whitefang
Enterprise-Level Plonker Who's Not Wrong
272 Posts |
Posted - 2009-04-30 : 11:53:10
|
It can but there is no reason for it to. |
|
|
raky
Aged Yak Warrior
767 Posts |
Posted - 2009-04-30 : 12:32:22
|
If That bit field is not set with any default value (Default constraint ) and you didn't insert value into that column.For eg:declare @test table ( id int identity(1,1), val varchar(30), ActiveYN bit)insert into @test select 'a', 1 union allselect 'b', 0 union allselect 'c' ,nullselect * from @test |
|
|
sqlfresher2k7
Aged Yak Warrior
623 Posts |
Posted - 2009-04-30 : 21:20:41
|
Thanks |
|
|
raky
Aged Yak Warrior
767 Posts |
Posted - 2009-05-01 : 12:06:20
|
Welcome... |
|
|
|
|
|