lundi 21 août 2017

how to split text with empty in MySQL like php str_split [duplicate]

This question already has an answer here:

I need to split my string in mysql, not in php.

I think it's necessary to add function to mysql.

A delimiter of SUBSTRING_INDEX cannot be blank.

any best way to do this?

from: teststring to : t*|e*|s*|t*|s*|t*|r*|i*|n*|g

I can do following in php

echo implode('*|', str_split('teststring'));

how to do in MySQL?




Aucun commentaire:

Enregistrer un commentaire