Here are eight top SQL string functions. These include Length, TRIM, Concatenate, Trailing, CHAR, LPAD, RPAD, and Soundex.

SQL String functions

  1. Length Function
  2. TRIM functions
  3. Concatenate function
  4. Trailing Function
  5. CHAR function
  6. LPAD
  7. RPAD
  8. Soundex

How to Use Built-in String Functions

Length

Select LENGTH (first_name) 
from my_employee;

The above query counts the FIRST_NAME of all characters that include spaces.

TRIM

Explained with examples of TRIM functions.

Concatenate

Select first_name 
|| last_name 
from my_employee;

Trailing Functions

Select Trim (trailing 
'y' from first_name) 
from my_employee;

Trailing is case-sensitive.

CHAR Function

Here are the best examples of the CHAR function you can find here.

and LPAD and RPAD

You can find here examples for RPAD and LPAD

Soundex

Select Soundex(first_name) 
from my_employee;

The above example converts ‘Srinimf’ into an Alpha-numeric value.

Audio Post

Related Posts