Return text between delimiters in MySQL

Submitted by:David Villa

Date added:19 January, 2015

Category:MySQL

Returns the text between the specified delimiters in MySQL.

Tags: return text , delimiters

Code Snippet:

SELECT 
SUBSTR(COLUMN,
LOCATE(':',COLUMN)+1,
(CHAR_LENGTH(COLUMN) - LOCATE(':',REVERSE(COLUMN)) - LOCATE(':',COLUMN)))
FROM TABLE
 
 

Comments