- 论坛徽章:
- 0
|
非常感谢,那可能是我这个mysql版本的bug,我的机器上的显示如下所示:
mysql> select substring(substring_index(reverse('abc/bcd/2'),'/',2),3);
+----------------------------------------------------------+
| substring(substring_index(reverse('abc/bcd/2'),'/',2),3) |
+----------------------------------------------------------+
| dcb |
+----------------------------------------------------------+
1 row in set (0.00 sec)
mysql> select reverse(substring(substring_index(reverse('abc/bcd/2'),'/',2),3
))
-> ;
+-------------------------------------------------------------------+
| reverse(substring(substring_index(reverse('abc/bcd/2'),'/',2),3)) |
+-------------------------------------------------------------------+
| b d |
+-------------------------------------------------------------------+
1 row in set (0.00 sec)
mysql> select version();
+------------------+
| version() |
+------------------+
| 5.0.22-community |
+------------------+
1 row in set (0.00 sec)
mysql> |
|