Concatenation operator in BigQuery

You might have encountered the slightly odd-looking || in SQL before, whether in BigQuery or your other database system.

If not yet, it's called the 'concatenation operator' and well, it concatenates things.

In fact, it's the ANSI SQL standard concatenation operator so in theory it should work across database engines (but it doesn't - for example SQL Server uses + instead for concatenating strings).

In BigQuery, it does the same thing as CONCAT() for STRINGs and ARRAY_CONCAT() for ARRAYs .

No alt text provided for this image

Found it useful? Subscribe to my Analytics newsletter at