Difference between revisions of "+ (string)"

From SQLZOO
Jump to: navigation, search
(Created page with "<table align='right' border='1'> <caption>Compatibility</caption> <tr><th colspan='3'>s1 + s2</th></tr> <tr><td align='center'>'''Engine'''</td><td align='center'>'''OK'''</td...")
 
(2 intermediate revisions by one user not shown)
Line 22: Line 22:
 
   FROM bbc
 
   FROM bbc
 
</source>
 
</source>
<source lang='sql' class='def e-sqloracle e-postgres'>
+
<source lang='sql' class='def e-oracle e-postgres'>
 
SELECT region || name
 
SELECT region || name
 
   FROM bbc
 
   FROM bbc
Line 34: Line 34:
 
<p>See also</p>
 
<p>See also</p>
 
<ul>
 
<ul>
   <li>[[SUBSTRING function]]</li>
+
   <li>[[SUBSTRING |SUBSTRING function]]</li>
 
   <li>[[TRIM |TRIM function]]</li>
 
   <li>[[TRIM |TRIM function]]</li>
 
</ul>
 
</ul>
 +
 +
{{Languages}}

Revision as of 09:49, 6 September 2012

Compatibility
s1 + s2
EngineOKAlternative
ingresYes
mysqlNoCONCAT(s1,s2)
oracleNos1 || s2
postgresNos1 || s2
sqlserverYes

+ (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
Personal tools
Namespaces

Variants
Actions
Reference
Toolbox
Google AdSense