SQL语句
条件字段DJLX的值是“销售”和“销退”
另个条件是 DY字段大于1的
但是要排除掉销退的DY,
要怎么写?脑袋短路,想不出来
where 1=1 and (djlx='销退' or(djlx='销售' and dy>1))
where
DJLX in('销售','销退') and DY>1
and
DY!='销退'
DJLX !='销退' AND DY>1
这样?
Oracle 的语法
where DJLX <>'销退' and DY>1
或
where DJLX!='销退' and DY>1
where (DJLX = '销售' && DY > 1) or DJLX = '销退'