Strings

From SQLZOO
Revision as of 18:05, 21 October 2012 by Peter (Talk | contribs)

Jump to: navigation, search
Compatibility
s1 || s2
EngineOKAlternative
ingresYes
mysqlNoCONCAT(s1,s2)
oracleYes
postgresYes
sqlserverNos1 + 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
Personal tools
Namespaces

Variants
Actions
Reference
Toolbox
Google AdSense