select field2 from table where field3 not like '%是%';
select * from table where field2 like '%B%';

解决方案 »

  1.   

    你想要得结果是否是这样的结果:Field1 Field2 Field3 Field4
    3 B 否
    4 B 否
    5 B 否
      

  2.   


    select Field1,Field2,Field3 ,Field4 from table where Field3='否' and Field2='B' order by Field2;
      

  3.   

    select distinct field2
    from table_name a
    where not exists(select field2
                from table_name b
                where field3 = '是' and b.field2 = a.field2
                group by field2 )
    and field3 <> '是'
      

  4.   

    to jsnicle(js_nicle)你的语句不行,我要的是 ashg_16700(安) 说得结果,
    而且B不是一个定值,不能用not in ,not exists,请大家继续阿!
      

  5.   


    select Field1,Field2,Field3 ,Field4 from table where Field3='否' and Field2='B' order by Field2;
    这个不对吗?????
      

  6.   

    TO 楼主:
    为何不能用not exists?
      

  7.   

    用not exists 会影响查询的速度.
      

  8.   

    用not exists 是种低效的方法.
      

  9.   

    SELECT * FROM TABLE
    MINUS
    SELECT * FROM TABLE WHERE Field3='是'
      

  10.   

    select field2 from table where field3 not like '%是%';
      

  11.   

    请教Croatia(Croatia) "MINUS"是什么意思,谢谢!!!
      

  12.   

    select Field1,Field2,Field3 ,Field4 from table where Field3='否' order by Field2;
      

  13.   

    谢谢大家,to zhaokeke2004(男人·海洋) not in 和not exists 速度太慢
        to Croatia(Croatia)你的方法很不错,可惜的是sql server2000中不支持minus阿, 
        我记得好像有表自连接还是自嵌套可以做,但是我写不出来
      

  14.   

    not exists可以使用索引Field3加索引就快了
      

  15.   

    select Field1,Field2,Field3,Field4 from table where isnull(Field3,'')<>'是' order by Field2;