当前位置: 代码迷 >> ASP.NET >> 数据表有个字段Up是Boolean类型,sql后面where条件要等于false,怎么写
  详细解决方案

数据表有个字段Up是Boolean类型,sql后面where条件要等于false,怎么写

热度:6221   发布时间:2013-02-25 00:00:00.0
数据表有个字段Up是Boolean类型,sql后面where条件要等于false,如何写?
"Select   *   FROM   Company   order   by   UpdateTime   WHERE   Up=false "

这样写错了。。要怎么写?

------解决方案--------------------------------------------------------
Accesss

"Select * FROM Company WHERE Up=true order by UpdateTime "
"Select * FROM Company WHERE Up=false order by UpdateTime "


SQL Server 通常选择 bit 类型,对应 .net 中类型 即 Boolean,但 sql 语句使用 1 和 0

"Select * FROM Company WHERE Up=1 order by UpdateTime "
"Select * FROM Company WHERE Up=0 order by UpdateTime "


------解决方案--------------------------------------------------------
jf,肯承认错误的是好孩子~~
------解决方案--------------------------------------------------------
SQL 用01
ACCESS才用ture false
  相关解决方案