concat()

Scalar. Returns the concatenation of two given binary values OR one or more string values.

Syntax

concat ( binary1, binary2 )
concat ( string1, ...stringn)

Parameters

binary1

A binary value

binary2

A binary value

string1

The first string value in the set.

stringn

The final string value in the set.

Usage

When working with binaries, concatenates the given binary arguments into a single binary and returns that value. The function returns NULL if either argument is NULL.

When working with strings, concatenates the given string arguments into a single string and returns that value. Literal text must be enclosed in single quotation marks.

Example

concat ( hex_binary ('aabbcc'), hex_binary ('ddeeff') ) returns AABBCCDDEEFF.

concat ( hex_binary ('ddeeff'), hex_binary ('aabbcc') )returns DDEEFFAABBCC.

concat ( 'MSFT', '_NYSE')returns MSFT_NYSE.