sql server - How to negate a bit column value in SQL -


how update table column in order revert value(set true if value false , false true! null remains null).

please exclude solutions 1 uses case when or iff() want like

update mytable set iseditable = !iseditable 

you can use bitwise not operator:

update mytable set iseditable = ~iseditable 

Comments

Popular posts from this blog

gcc - MinGW's ld cannot perform PE operations on non PE output file -

timeout - Handshake_timeout on RabbitMQ using python and pika from remote vm -

c# - Search and Add Comment with OpenXML for Word -