日期:2014-05-17 浏览次数:20701 次
select * from TableName
where (case when a=0 then 1 else 0 end+case when b=0 then 1 else 0 end
+case when c=0 then 1 else 0 end+case when d=0 then 1 else 0 end
+case when e=0 then 1 else 0 end+case when f=0 then 1 else 0 end )=3
and (a+b+c+d+e+f)>=6