7
7
The SQL standard defines a concatenation operator ( || ), which joins two or more strings into one string value.
8
The CONCAT(str1, str2….) function can have one or more arguments. It returns a string that is the result of concatenating the arguments.
8
The CONCAT(str1, str2...) function can have one or more arguments. It returns a string that is the result of concatenating the arguments.
10
10
* If arguments are non-binary strings, the result is also a non-binary string.
11
11
* If any argument is a binary string, then the result will also be a binary string.
17
CONCAT(str1, str2, [,...n])
17
CONCAT(str1, str2, [,...n])
19
22
SELECT CONCAT('Dr', 'izzl', 'ed');
21
Returns: 'Drizzled' ::
23
28
SELECT CONCAT('micro', NULL, 'nel');
27
34
SELECT CONCAT(14.8);
33
CONCAT WS (With Separator) allows you to specify that the first argument is treated as a separator for the rest of the arguments. This argument is added between the strings to be concatenated.
40
CONCAT WS (With Separator) [1]_ allows you to specify that the first argument is treated as a separator for the rest of the arguments. This argument is added between the strings to be concatenated.
35
* If the separator is NULL then the result is NULL.
38
CONCAT_WS(separator str1, str2,....)
44
CONCAT_WS(separator str1, str2,....)
41
50
SELECT CONCAT_WS(',', ' Occupation', 'First name', 'Last Name');
43
52
Returns: 'Occupation, First name, Last Name'
45
56
SELECT CONCAT_WS(',', 'First name', NULL, 'Last Name');
47
58
Returns: 'First name, Last Name'
53
64
The TRIM function remove specified prefixes or suffixes from a string (typically leading and trailing spaces), and returns the resulting string. If none of the specifiers BOTH, LEADING, or TRAILING is given, BOTH is assumed.