String Functions SQL
How to find the length of a string¶
In this case, let say that we want to print the size or length of a string.
LEFT()
and RIGHT()
functions useful to make substrigns¶
The LEFT()
function extracts a number of characters from a string (starting from left.
Syntax LEFT()¶
Example: Extract 5 characters from the text in the "CustomerName" column (starting from left):
now, The RIGHT()
function extracts a number of characters from a string (starting from right).
Syntax RIGHT()¶
CONCAT()
function¶
The CONCAT() function adds two or more expressions together.
Syntax CONCAT()¶
Example:
CONCAT_WS()
function¶
The CONCAT_WS()
function adds two or more expressions together with a separator.
Syntax CONCAT_WS()¶
Example