Mega Code Archive

 
Categories / MySQL / String
 

SUBSTRING(string, position, length)

mysql> mysql> SELECT SUBSTRING('cats and dogs and more dogs', 10, 4); +-------------------------------------------------+ | SUBSTRING('cats and dogs and more dogs', 10, 4) | +-------------------------------------------------+ | dogs                                            | +-------------------------------------------------+ 1 row in set (0.00 sec) mysql>