Mega Code Archive

 
Categories / MySQL Tutorial / String Functions
 

SUBSTRING_INDEX(www java2s com, , -2)

mysql> mysql> SELECT SUBSTRING_INDEX('www.rntsoft.com', '.', -2); +--------------------------------------------+ | SUBSTRING_INDEX('www.rntsoft.com', '.', -2) | +--------------------------------------------+ | rntsoft.com                                 | +--------------------------------------------+ 1 row in set (0.00 sec) mysql>