首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 数据库 > Mysql >

[转] MySQL between 的顺序有关问题

2012-07-03 
[转] MySQL between 的顺序问题mysql (select yes from dual where 5 between 1 and 10) union (select

[转] 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)


以前一直没问题原来是运气好 ..

热点排行