如何更新位字段 [英] how to update a bit field

查看:95
本文介绍了如何更新位字段的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我有一个带有两列的表,即ID,状态(int,bit)
1 0
2 1
3 0
4 0
5 1
我必须编写查询以更新位字段,即1将为0,0将为1.
有人可以帮我吗?

感谢和问候
raghvendra kumar Roy

Hi all,

I have a table with two column i.e ID,Status (int,bit)
1 0
2 1
3 0
4 0
5 1
I have to write a query to update bit field i.e 1 will be 0 and 0 will be 1.
can anybody help me?

thanks and regards
raghvendra kumar Roy

推荐答案

尝试一下.
Try this.
update tablename set columnname = ~ columnname


这篇关于如何更新位字段的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆