Difference between revisions of "CONCAT"
From SQLZOO
| Line 37: | Line 37: | ||
<li>[[TRIM |TRIM function]]</li> | <li>[[TRIM |TRIM function]]</li> | ||
</ul> | </ul> | ||
| + | |||
| + | {{Languages}} | ||
Latest revision as of 11:12, 1 October 2012
| CONCAT(s1, s2) | ||
|---|---|---|
| Engine | OK | Alternative |
| ingres | Yes | |
| mysql | Yes | |
| oracle | No | s1 || s2 |
| postgres | No | s1 || s2 |
| sqlserver | No | s1 + s2 |
CONCAT
CONCAT allows you to stick two or more strings together.
This operation is concatenation.
CONCAT(s1, s2 ...)
In this example you put the region and the name together for each country.
SELECT region || name FROM bbc
SELECT region + name FROM bbc
SELECT CONCAT(region,name) FROM bbc
See also
| Language: | English • Deutsch |
|---|