回覆列表
  • 1 # 下雨的熱天

    資料太大,用資料庫客戶端軟體直接匯入非常卡,還是直接執行SQL吧。

    1、指定檔案路徑。

    2、欄位之間以逗號分隔,資料行之間以\r\n分隔(我這裡檔案是以\n分隔的)。

    3、字串以半形雙引號包圍,字串本身的雙引號用兩個雙引號表示。 Sql程式碼 複製程式碼 程式碼如下:load data infile "D:\\top-1m.csv" into table `site` fields terminated by "," optionally enclosed by """ escaped by """ lines terminated by "\n"; 順帶也備份個匯出吧。 Sql程式碼 複製程式碼 程式碼如下:select * from `site` into outfile "D:\\top-1m.csv" fields terminated by "," optionally enclosed by """ escaped by """ lines terminated by "\n";

  • 中秋節和大豐收的關聯?
  • 學C++ 就一定要做ACM題嗎?