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
- Length Function
- TRIM functions
- Concatenate function
- Trailining Function
- CHAR function
List of SQL string functions.
Select LENGTH (first_name) from my_employee;
The above query counts the first_name all characters that including spaces.
Explained with examples about TRIM functions.
Select first_name || last_name from my_employee;
4). Trailing Functions
Select Trim (trailing 'y' from first_name) from my_employee;
Trailing is a case sensitive.
5). CHAR Function
Best examples of CHAR function you can find here.
6). and 7). LPAD and RPAD
You can find here examples for RPAD and LPAD
Select Soundex(first_name) from my_employee;
The above example converts ‘Srinimf’ into a Alpha-numeric value.