How to use CONCAT with + in BigQuery

Viewed 64

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.

2 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.

One more option :o)

SELECT FORMAT('%s %s', 'Hello', 'World')
Related