開始使用免費開始

串接字串

evanston311 中,門牌號碼(house_num)與 street 位在不同欄位。請用 concat() 將它們串接起來,並在兩者之間加入一個空白。

本練習屬於課程

SQL 中的探索式資料分析

檢視課程

練習說明

  • 使用 concat()house_num、一個空白 ' '、以及 street 串接成單一值。
  • 使用修剪(trim)函式,從串接結果的「開頭」移除任何空白。

動手互動練習

試著完成這個範例程式碼,體驗一下這個練習。

-- Concatenate house_num, a space, and street and trim spaces from the start of the result
SELECT ___ AS address
  FROM evanston311;
編輯並執行程式碼