SUBSTRING_INDEX(str,delim,count) : SUBSTRING_INDEX : String Functions MySQL TUTORIALS


MySQL TUTORIALS » String Functions » SUBSTRING_INDEX »

 

SUBSTRING_INDEX(str,delim,count)


If count is positive, everything to the left of the final delimiter is returned.

If count is negative, everything to the right of the final delimiter is returned.

SUBSTRING_INDEX() performs a case-sensitive match when searching for delim.

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

mysql>



Leave a Comment / Note


 
Verification is used to prevent unwanted posts (spam). .

Follow Navioo On Twitter

MySQL TUTORIALS

 Navioo String Functions
» SUBSTRING_INDEX