比如我现在要实现查询在时间段1或者时间段2或者时间段3里的,都是金额大于0的客户。
select 客户 from 表 where 金额>0 and (date in (‘时间段1’)or (date in (‘时间段2’)or (date in (‘时间段3’))这样么?
and 和or使用的时候需要加()么?
...全文
7692打赏收藏
AND 和 OR一起用的方法
比如我现在要实现查询在时间段1或者时间段2或者时间段3里的,都是金额大于0的客户。 select 客户 from 表 where 金额>0 and (date in (‘时间段1’)or (date in (‘时间段2’)or (date in (‘时间段3’))这样么? and 和or使用的时候需要加()么?