56,687
社区成员
发帖
与我相关
我的任务
分享
[attach]886[/attach]
mysql> set @x='[at
tach]886[/attach]';
Query OK, 0 rows affected (0.00 sec)
mysql> select substring_index(substring_index(@x,']',-4),'[',3);
+---------------------------------------------------+
| substring_index(substring_index(@x,']',-4),'[',3) |
+---------------------------------------------------+
| [attach]886[/attach] |
+---------------------------------------------------+
1 row in set (0.00 sec)
mysql>