易截截图软件、单文件、免安装、纯绿色、仅160KB

求sql文

求A != 1 and B != 2 以外的记录
a!=1 and b!=2 以外?

那岂不是a=1或者b=2的这种情况么

select * from table where a = 1 or b = 2

如果是A != 1 and B != 2的话
select * from table where a <> 1 and b <> 2

where not(A!=1 and B!=2)

引用
如果是A != 1 and B != 2的话
select * from table where a <> 1 and b <> 2


这样子OK!

各位:
  请看好了,是A != 1 同时 B!= 2 以外的情况

A != 1 and B!= 2
它的反义就是:
A = 1 or B = 2

引用
各位:
  请看好了,是A != 1 同时 B!= 2 以外的情况

你的描述存在歧义
如果是“求A != 1” and“ B != 2 以外的记录”
条件就写
where a!=1 and not(b!=2)
当然你也可以写成where a!=1 and b=2
你根据需要修改下

A != 1 同时 B!= 2 以外的情况

情况1:
(A != 1 同时 B!= 2)以外的情况,则
a = 1 or b = 2 or a is null or b is null;

情况2:
A != 1 同时 (B!= 2以外)的情况,则
a != 1 and (b = 2 or b is null);

离散数学书上有。

引用
各位:
  请看好了,是A != 1 同时 B!= 2 以外的情况



相关问答:

如何用c#,sql2000 开发c/s下的工作流?

本人c#新手 可是要求要用c# ,sql2000开发c/s的工作流,一头雾水,请大家帮忙帮忙,给点思路,说的约具体越好,我也好往那个方面去学习
http://www.hxzi.com/view/61402.html
B/S版的,基本思想应该差不多的。。 ......

sql 查询

  我有一个月和日组成的数字,有两组月和日
想在身份证号中挑选出在该该两组月日之间出生的人,不知道应该怎么写.
身份证号有可能是15位或者18位

月日组合的形式如下
10-17/04-20
月-日/月- ......

sql 问题

DateTime startTime=DateTime(em_1.Text)
DateTime endTime=DateTime(em_2.Text)

string sql
sql = dw_1.GetSQLSelect()+"Where (StartTime> '"+startTime+"') and (EndTime ......

sql格式化输出

SQL code:

SQL> col deptno format a10 heading "编号"
SQL> select * from dept;
编号 部门 LOC
---------- ---------- -------------
########## ACCOUNTING NEW YORK
##### ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号