@see MySQL 5.1 Reference Manual
12.3 String Functions
SELECT SUBSTRING("The world's most popular open source database.", 5);
#->world's most popular open source database.
SELECT SUBSTRING("The world's most popular open source database.", 5, 5);
#->world
SELECT TRIM(LEADING 'x' FROM 'xxxbarxxx');
#->'barxxx'
SELECT TRIM(BOTH 'x' FROM 'xxxbarxxx');
#->'bar'
SELECT TRIM(TRAILING 'xyz' FROM 'xxyzbarxxyz');
#->'xxyzbarx'
SELECT RIGHT('foobarbar', 4);
#->'rbar'
SELECT LEFT('foobarbar', 4);
#->'foob'
SELECT REVERSE('barcelona');
#->'anolecrab'
SELECT REPLACE('www.mysql.com', 'w', 'Ww');
#->'WwWwWw.mysql.com'
SELECT LOWER('BARCELONA');
#->'barcelona'
SELECT UPPER('barcelona');
#->'BARCELONA'
SELECT INSERT('Quadratic', 3, 4, 'What');
#->'QuWhattic'
SELECT CHAR_LENGTH('中国CHINA');
#->7
SELECT LENGTH('中国CHINA');
12.3 String Functions
SELECT SUBSTRING("The world's most popular open source database.", 5);
#->world's most popular open source database.
SELECT SUBSTRING("The world's most popular open source database.", 5, 5);
#->world
SELECT TRIM(LEADING 'x' FROM 'xxxbarxxx');
#->'barxxx'
SELECT TRIM(BOTH 'x' FROM 'xxxbarxxx');
#->'bar'
SELECT TRIM(TRAILING 'xyz' FROM 'xxyzbarxxyz');
#->'xxyzbarx'
SELECT RIGHT('foobarbar', 4);
#->'rbar'
SELECT LEFT('foobarbar', 4);
#->'foob'
SELECT REVERSE('barcelona');
#->'anolecrab'
SELECT REPLACE('www.mysql.com', 'w', 'Ww');
#->'WwWwWw.mysql.com'
SELECT LOWER('BARCELONA');
#->'barcelona'
SELECT UPPER('barcelona');
#->'BARCELONA'
SELECT INSERT('Quadratic', 3, 4, 'What');
#->'QuWhattic'
SELECT CHAR_LENGTH('中国CHINA');
#->7
SELECT LENGTH('中国CHINA');
#->11
SELECT CONCAT('My', 'S', 'QL');
#->'MySQL'