How to Concatenate Strings in BigQuery

To contact two or more strings in BigQuery can use the function CONCAT or alternatively use the “||” operator:

WITH schedules AS
  (SELECT 'Marlins' as homeTeamName, 'Cubs' as awayTeamName UNION ALL
   SELECT 'Braves', 'Cubs' UNION ALL
   SELECT 'Marlins', 'Braves' 
  )
SELECT CONCAT(homeTeamName, ' vs ', awayTeamName) as match,
homeTeamName ||' vs ' ||awayTeamName AS match2 
FROM schedules
match match2
Marlins vs Cubs Marlins vs Cubs
Braves vs Cubs Braves vs Cubs
Marlins vs Braves Marlins vs Braves

IN THIS PAGE