mysql> select substring_index('a b c d',' ',2); +----------------------------------+ | substring_index('a b c d',' ',2) | +----------------------------------+ | a b | +----------------------------------+ 1 row in set (0.00 sec)mysql>
那我再试试,可不可以这样用 set x=substring_index("januaary 8",' ',-1) select x;得出的结果是不是应该为8
'截至2011-07-09 12:48:54 用户结帖 正常结帖:0 当您的问题得到解答后请及时结贴.
http://topic.csdn.net/u/20090501/15/7548d251-aec2-4975-a9bf-ca09a5551ba5.html
http://topic.csdn.net/u/20100428/09/BC9E0908-F250-42A6-8765-B50A82FE186A.html
http://topic.csdn.net/u/20100626/09/f35a4763-4b59-49c3-8061-d48fdbc29561.html8、如何给分和结贴?
http://community.csdn.net/Help/HelpCenter.htm#结帖
+----------------------------------+
| substring_index('a b c d',' ',2) |
+----------------------------------+
| a b |
+----------------------------------+
1 row in set (0.00 sec)mysql>
select x;得出的结果是不是应该为8