I have three bit columns colA, colB and colC. If colA and ColC are both updated and set to 1. How can I automatically update the third Column ColC to 1 via a SQL rule or constraint. Meaning Colc is only set to 1 if ColA and ColB are 1.
Is there a better way to hanlde this design?
declare @Tab table (i smallint default 0, j smallint default 0 , k as (i+j))
insert into @tab select 1,0
union all select 1,1
Select * from @tab