Click here to Skip to main content
15,879,535 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
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
Posted
Updated 29-May-11 21:28pm
v2

1 solution

Try this.
update tablename set columnname = ~ columnname
 
Share this answer
 
Comments
Raghvendra Kumar Roy 30-May-11 5:34am    
ya it's work. thanks toniyo

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900