MySQL Text Functions

Function Usage Returns
CONCAT() CONCAT(t1, t2, ...) A new string of the form t1t2
CONCAT_WS() CONCAST_WS(S, t1, t2, ...) A new string of the form t1St2S...
LENGTH() LENGTH(t) The number of characters in t
LEFT() LEFT(t, y) The leftmost y characters from t
RIGHT() RIGHT(t,x) The rightmost x characters from t
TRIM() TRIM(t) t with excess spaces from the beginning and end removed
UPPER() UPPER(t) t capitalized
LOWER() LOWER(t) t in all lowercase format
REPLACE() REPLACE(t1, t2, t3) The string t1 with instances of t2 replaced with t3
SUBSTRING() SUBSTRING(t, x, y) y characters from t beginning with x (indexed from 1)