--The length of the string
SELECT Length (' abc '), Length (' My home ');
SELECT char_length (' abc '), Char_length (' my Home ');
--Merging strings
SELECT CONCAT (' A ', ' B ', ' C '), Concat_ws (', ', ' A ', ' B ', ' C '), CONCAT (null, ' a '), Concat_ws ('-', ' 010 ', NULL, ' 1111 ', ' 2222 ')
--Replacement string
SELECT INSERT (' ABCDEFG ', 2,10, ' 1111111111 '), REPLACE (' ABCDEFG ', ' abc ', ' 111 ')
--String case
SELECT LOWER (' abc '), LCASE (' abc '), UPPER (' abc '), UCASE (' abc ')
--Get string
SELECT left (' ABCDEFG ', 3), right (' ABCDEFG ', 3)
--Padding string
SELECT lpad (' abc ', 5, ' * '), Rpad (' abc ', 5, ' * '), Rpad (' ABCEFG ', 5, ' * ')
--Remove spaces
SELECT Trim (' * ' from ' **abc** '), trim (' abc '), LTRIM (' abc '), RTRIM (' abc ')
--Duplicate string generation
SELECT REPEAT (' abc ', 3)
--Space function
SELECT Concat_ws (Space (3), ' B ', Space (3), ' a ')
--Compare string size
SELECT STRCMP (' abc ', ' Abd '), STRCMP (' abc ', ' abc '), STRCMP (' Abe ', ' Abd ')
--Get string
SELECT SUBSTRING (' 0,1,2,3 ', 5,2), SUBSTRING (' 0,1,2,3 ', 5), Mid (' 0,1,2,3 ', 5,2), Mid (' 0,1,2,3 ', 5)
--Reverse string
SELECT REVERSE (' ABCDEFG ')
--Match string start position
SELECT LOCATE (' ab ', ' DGDSABDFDSA '), POSITION (' ab ' in ' Dgdsabdfdsa '), INSTR (' Dgdsabdfdsa ', ' ab '), Find_in_set (' Ab ', ' Dgdsabdfdsa,ab|,ab ')
--Returns the string at the specified position
SELECT ELT (2, ' A ', ' B ', ' C '), FIELD (' B ', ' A ', ' B ', ' C '), ELT (2, ' a,b,c ')
--Binary
SELECT Make_set (5, ' A ', ' B ', ' C ');
MySQL string manipulation