Book Contents

Book Index

Next Topic

Home

String Concatenation Operators

To concatenate two strings on a single line, use the concatenation operator (two consecutive vertical bars).

Syntax

string || string

Semantics

 

string

is an expression of type CHAR or VARCHAR

Notes

Examples

> SELECT 'auto' || 'mobile';

?column?

----------

automobile

(1 row)

 

> SELECT 'auto'

> 'mobile';

?column?

----------

automobile

(1 row)