简体   繁体   中英

How to use CONCAT to join five columns

HOW DO I USE CONCAT IN BIGQUERY TO JOIN FIVE COLUMN

I WAS TRYING TO JOIN FIVE COLUMNS IN A TABLE. LIKE THIS

SELECT CONCAT(start_station_id, start_station_name, end_station_name, usertype, num_trips)

I want a result with space between them.

SELECT CONCAT(start_station_id, ' ', start_station_name, ' ', end_station_name, ' ', usertype, ' ', num_trips) AS concatenated_columns
FROM your_table;
The query above will concatenate the five columns start_station_id , start_station_name , end_station_name , usertype , and num_trips with a space between each column. The result will be a new column called concatenated_columns .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2025 STACKOOM.COM