sql查询不为真的数据 GBACK字段为BIT类型,里面有几个NULL和TRUE的值但是用select C_PART from DPSALES where GBACK<>1得不到那些不为真的数据,请帮忙,谢谢! 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 select C_PART from DPSALES where ISNULL(GBACK,0) = 0 --try:select C_PART from DPSALES where isnull(GBACK,1)<>1 --查出不为真的select C_PART from DPSALES where isnull(GBACK,0)<>1 declare @DPSALES table(C_PART int,GBACK bit)--select C_PART from DPSALES where GBACK<>1insert @DPSALES select 1,1insert @DPSALES select 2,nullinsert @DPSALES select 3,nullselect C_PART from @DPSALES where GBACK is null/*C_PART ----------- 23(所影响的行数为 2 行)*/ 你是要找出NULL值吗?select C_PART FROM DPSALES WHERE GBACK IS NULL 求教,数据表设计 求sql语句写法,谢谢。 sql server表中,字段过长的坏处? ssiS中如何给 dataflow的数据源设置动态的sql脚本 用int做查询条件还是用Varchat做查询条件?哪个效率高? 关于数据表中的索引 请问我的sql语句在查询分析器能执行,为什么到delphi就不行了? WIN2000高级服务器版+MS SQL SERVER 70上不能创建新表?! 一个关于数据库独占的问题!高手请进!! 关于搜索引擎的问题!大家提点意见! 补丁 问个SQL语句
select C_PART from DPSALES where ISNULL(GBACK,0) = 0
--try:
select C_PART from DPSALES where isnull(GBACK,1)<>1
--查出不为真的
select C_PART from DPSALES where isnull(GBACK,0)<>1
--select C_PART from DPSALES where GBACK<>1
insert @DPSALES select 1,1
insert @DPSALES select 2,null
insert @DPSALES select 3,null
select C_PART from @DPSALES where GBACK is null
/*
C_PART
-----------
2
3(所影响的行数为 2 行)
*/