UPDATE dbo.Test SET ColB=
(CASE ColB WHEN 1 THEN 0 ELSE 1
END);
If the values are
always 0 or 1
Then you can use this also
UPDATE dbo.Table1 SET ColB= (ColB^ 1);
^ is bitwise or (exclusive or)
No comments:
Post a Comment