Welcome back to another SQL tutorial!
Today, we will learn commonly used string-text functions which are very handy for data cleaning.
returns all the letters in uppercase and returns all the letters in lowercase.
returns the length of the string.
function returns the first characters in the string and the function returns the last characters in a string.
function removes spaces from a string.
Here's 3 more functions to handle string trimming.
function is used to concatenate two or more strings into one.
|vanilla email@example.com||Alice Bell|
function returns a part of a string based on the defined starting point and length.
For , the starting point is 1 and ends at 8, hence it starts from "H" and ends at "o" returning "Hello Wo".
For , the starting point is 8 and as there is no length specified, SQL defaults the endpoint at the last letter, hence it returns "orld".
These functions may be simple, but they are fundamental to the core of database querying so make sure that you know them well.
Handling NULL Values