Skip to main content

Command Palette

Search for a command to run...

Concatenation operator in BigQuery

Updated
1 min read
Concatenation operator in BigQuery
C

Senior Data Engineer • Contractor / Freelancer • GCP & AWS Certified

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 .

Found it useful? Subscribe to my Analytics newsletter at notjustsql.com.

Practical SQL

Part 1 of 50

Short, practical posts on SQL and BigQuery — from core language features to advanced query patterns. A reference for data practitioners at every level.

More from this blog

D

Datawise: A blog on SQL, BigQuery, Analytics, Python Tips and Tricks

204 posts

Data Engineer with a passion for transforming complex data landscapes into insightful stories. Here on my blog, I share insights, challenges, and the ever-evolving dance of technology and business.