|| (string concatenator)

<< NULL literals allowed as operands | FB 2.0 Language Reference | ALL >>

|| (string concatenator)

Available in: DSQL, ESQL, PSQL

Result type VARCHAR

Changed in: 2.0

Description

The result type of string concatenations used to be CHAR(n). Starting with Firebird 2.0, it is VARCHAR(n). As a result, the maximum length of a concatenation outcome is now 32765 instead of 32767.

Overflow checking

Changed in: 1.0, 2.0

Description

In Firebird versions 1.x, an error would be raised if the sum of the declared string lengths in a concatenation exceeded 65535 bytes, even if the actual result lay within the maximum string length of 32767 bytes. In Firebird 2.0 and up, the declared string lengths will never cause an error. Only if the actual outcome exceeds 32765 bytes (the new limit for concatenation results) will an error be raised.

back to top of page
<< NULL literals allowed as operands | FB 2.0 Language Reference | ALL >>