sql 存储过程 查询条件 空时显示全部数据

select * from 表 where 1=1

and

1=case when isnull(参数变量,'')='' then 1 else

    case when 列=参数变量 then 1 else 0

    end

    end

 

posted @ 2014-10-17 15:43  BeamWen  阅读(427)  评论(0编辑  收藏  举报