select * from tableName where  when A=A and C and B
--这样不行吗?

解决方案 »

  1.   

    select * from tableName Where ((条件A and 条件C) or not 条件A) and 条件B
      

  2.   

    如果条件A成立,则也要满足条件c和条件b,是这意思吗?
      

  3.   

    select * from 表 where (条件A and 条件C and 条件B) or not 条件A
      

  4.   

    --例如:条件A为:a=1,条件B为:b=1,条件C为:c=1
    select * from 表 where (a=1 and b=1 and c=1) or not(a=1)
      

  5.   

    是的,如果A成立,那么条件要满足B和C
    如果A不成立,那么只满足条件B就行了
      

  6.   

    select * from 表 where (条件A and 条件C and 条件B) or (not 条件A and 条件B)
      

  7.   

    select * from tableName where (Case A when A then C and B else b end )