如果 传入参数为空,则查询条件默认为true

select 1 from table where field1 =isnull(@field1 ,field1)

其他的待补充 。。。。。。。。。。。。。。