解决方案 »

  1.   


    select  *  from  A where 1 = isnull(col, 1) or col='条件'
      

  2.   

    case when then配合isnull函数。
      

  3.   

    select  *  from  A where 1 = case when col is null then 1 when col='条件' then 1 else 0 end
      

  4.   

    sqlserver有case when 语法select case sex when 1 then '男' else '女' end  from tablexxx
      

  5.   

    如此简单的问题,都不好意思来抢分啊
    select  *  from  A where col is null or col='条件'
      

  6.   

    select  *  from  A where 1 = case when col is null then 1 when col='条件' then 1 else 0 end 
      

  7.   

    select  *  from  A where 1 = isnull(col, 1) or col='条件'
      

  8.   

    select  *  from  A where 1 = isnull(col, 1) or col='条件'