Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to use CONCAT with + in BigQuery

I tried using CONCAT with + sign in SQL, however I am not getting the correct syntax to perform this query. The tool that I am using is Google BigQuery.

like image 507
Nitin Umesh Avatar asked Oct 15 '25 02:10

Nitin Umesh


1 Answers

To concatenate strings in BigQuery, we can either use the CONCAT() function, or we can use the || ANSI concatenation operator:

SELECT CONCAT('Hello', 'World')
SELECT 'Hello' || 'World'

Other databases such as SQL Server use the + operator for string concatenation, but not BigQuery.

like image 87
Tim Biegeleisen Avatar answered Oct 17 '25 16:10

Tim Biegeleisen