8 Top String Functions Useful to Write SQL Queries Smartly

You can become smart when you write complex SQL queries. You will get better pay when you write Quickly. You will be appreciated when you use built-in string functions. Today I am sharing on top SQL String functions.


SQL String functions

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

How to use SQL string functions.

1). Length

Select LENGTH (first_name) 
from my_employee;

The above query counts the first_name all characters that including spaces.

2). TRIM

Explained with examples about TRIM functions.

3). Concatenate

Select first_name 
|| last_name 
from my_employee;

4). Trailing Functions

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

Trailining is a case sensitive.

5). Soundex

Select Soundex(first_name) 
from my_employee;

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

Audio Post

Related Posts