SQL SELECT Statement
If you wish to concatenate 2 strings i.e. combine 2 strings, then you can use the Concatenation Operator which is denoted by + symbol.
This is used to combine 2 strings into a single string
expression1 + expression2
You can also code like this –
For Strings, You can also use + operator in the WHERE clause but it is rarely used –
Also, it is important to note that + operator will act as a concatenation operator when you use this with strings but it will add 2 or more numeric values when used with Numeric values.
There is a string function Concat() which can also be used for string concatenation. This will add 2 or more strings.
There is a way to add a separator during the concatenation process using the concat_ws() function.
Combining concat() function with concat_ws() function
You can nest concat() function within another concat() function.
Similarly, you can also nest concat_ws() function within another concat_ws() function.
It is also easy to combine concat() function with concat_ws() function.