什么是&& (a || b)相当于?

时间:2015-08-22 14:14:14

标签: boolean logic

一个。真

B中。一个

℃。 a || !B'/ P>

d。 !a || B'/ P>

有人可以向我解释一下吗? 感谢

1 个答案:

答案 0 :(得分:1)

从&&和||是short circuit operators

select d1.recorded_at rec_at, d2.recorded_at closest, min(d2.recorded_at - d1.recorded_at) difference
from data d1, data d2
where d1.recorded_at in ('2015-01-01 01:01:01', '2015-02-01 01:01:01', ...)
      and d2.recorded_at > d1.recorded_at
group by d1.recorded_at

所以,if a = true // output is true if a = false // output is false 就是答案