SqlServer中的bit类型

在SQL Server 表设计界面显示的是true/false,输入也是true/false

select查询出来的结果是1/0,可以用1/0也可以用true/false输入,如果用true/false需要以字符串格式,例如

select * from 表名 where 列=1  等同于

select * from 表名  where 列='true'

在界面上可以用于CheckBox选项等

读bit字段的值时,在SqlServer中用sql语句查出来的结果中显示为0和1,

程序中用一个datatTable返回结果,然后dataTable.rows[i][j].toString()得到的字符串

的值是“true”和“false” 

原文地址:https://www.cnblogs.com/songjuntao/p/15583437.html