SQL String Functions
String manipulation — CONCAT, SUBSTRING, REPLACE, TRIM, UPPER, LOWER, LENGTH. This category documents 37 SQL string functions entries, and each page gives you the full syntax, the parameter list, the return value, and a runnable example tested against MySQL, PostgreSQL, SQL Server, and SQLite. The entries are: CONCAT(), SUBSTRING(), REPLACE(), LENGTH(), TRIM(), UPPER(), LOWER(), LPAD() / RPAD(), INSTR(), LEFT() / RIGHT(), REVERSE(), REPEAT(), SPACE(), LOCATE() / POSITION(), CONCAT_WS(), CHAR_LENGTH() / CHARACTER_LENGTH(), ASCII(), CHAR(), FIELD(), ELT(), SOUNDEX(), QUOTE(), TRANSLATE(), REGEXP_REPLACE() / REGEXP_SUBSTR(), COMPARE() / STRCMP(), REGEXP_LIKE / REGEXP_INSTR, BIT_LENGTH() / OCTET_LENGTH(), POSITION() / STRPOS(), TRIM (variations), CONVERT() Function, DECODE() vs CASE, BIN() / OCT(), FORMATMESSAGE(), STRING_ESCAPE(), STRING_SPLIT() (SQL Server 2016+), COLLATION (String Comparison), SQL CONCAT (Operator ||). Not sure where to start? CONCAT() and SUBSTRING() are the most commonly used entries in this category. You can also search across every category from the search page, browse the complete A–Z index, or try any of these statements live in the SQL playground.