Today at work a colleague came up with a really interesting question. Let’s consider this :
We have a table that has two columns Id, IsValid.
Id is our primary key, while IsValid is a not null bit column.
Can we flip the values of IsValid column in one query?
For example if we have:
with a single update script to become
Is it possible?