[转] MySQL between 的顺序问题
mysql> (select "yes" from dual where 5 between 1 and 10) union (select "no") limit 1;
+-----+
| yes |
+-----+
| yes |
+-----+
1 row in set (0.02 sec)
mysql> (select "yes" from dual where 5 between 10 and 1) union (select "no") limit 1;
+-----+
| yes |
+-----+
| no |
+-----+
1 row in set (0.00 sec)
以前一直没问题原来是运气好 ..