开发者

Update sql bit field in database

开发者 https://www.devze.com 2023-03-24 02:59 出处:网络
In a sql table I have a bit field and the value is displayed as True, when I update in codeUpdate table1 set Active=\'True\' it makes the update but the value is now displaye开发者_开发技巧d as 1 inst

In a sql table I have a bit field and the value is displayed as True, when I update in code Update table1 set Active='True' it makes the update but the value is now displaye开发者_开发技巧d as 1 instead of True. How do I make it put the value 'True' instead of the integer in the table? Thanks.


Bits in SQL Server are always stored as 1 or 0 in a bitmap.

The "Edit Table" option in SSMS just translates this to True or False for presentation purposes, this is nothing to do with how it is actually stored.

0

精彩评论

暂无评论...
验证码 换一张
取 消