Difference between revisions of "Strings"
From SQLZOO
| Line 9: | Line 9: | ||
<tr><td align='left'>sqlserver</td><td>No</td><td>s1 + s2</td></tr> | <tr><td align='left'>sqlserver</td><td>No</td><td>s1 + s2</td></tr> | ||
</table> | </table> | ||
| + | |||
<h1>|| (strings)</h1> | <h1>|| (strings)</h1> | ||
<p>|| allows you to stick two or more strings together. </p> | <p>|| allows you to stick two or more strings together. </p> | ||
| Line 37: | Line 38: | ||
<li>[[TRIM |TRIM function]]</li> | <li>[[TRIM |TRIM function]]</li> | ||
</ul> | </ul> | ||
| + | |||
| + | {{Languages}} | ||
Revision as of 17:05, 21 October 2012
| s1 || s2 | ||
|---|---|---|
| Engine | OK | Alternative |
| ingres | Yes | |
| mysql | No | CONCAT(s1,s2) |
| oracle | Yes | |
| postgres | Yes | |
| sqlserver | No | s1 + s2 |
|| (strings)
|| allows you to stick two or more strings together.
This operation is concatenation.
s1 || s2
In this example you put the region and the name together for each country.
SELECT CONCAT(region,name) FROM bbc
SELECT region + name FROM bbc
SELECT region || name FROM bbc
See also
| Language: | English • Deutsch |
|---|