如何使用 phpMyAdmin 將 CSV 檔案匯入現有資料庫表?

Barbara Streisand
發布: 2024-10-25 03:46:29
原創
140 人瀏覽過

How can I import a CSV file into an existing database table using phpMyAdmin?

將CSV 匯入phpMyAdmin

您已取得一個CSV 文件,其資料結構如下:

candidate_id,show_on_site,first_name,surname,gender,DOB,showdob,Location,height,eyes,hair_colour,hair_length,accents,unions,training,url,visible,availability
,26,urban talent,Strawberry,Shortcake,Female,11 Jan 1942,FALSE,Manchester,5'2,Brown,Black,Mid-length,Native Lancashire,Equity,Urban Talent TV & Drama Workshops,Strawberry-Shortcake---5.4.06.jpg,Yes,Yes
,29,urban talent,Rainbow,Brite,Female,12 Oct 1970,FALSE,Manchester,5'7,Brown,Dark Brown,Long,"Native Manchester, others include - Cheshire, RP, Patois, Standard USA",Equity Member,"BA Acting Studies, Arden School of Theatre<br>Urban Talent TV &amp; Drama Workshops",Rainbow Brite 1_1.jpg,Yes,Yes
登入後複製

並且phpMyAdmin 中的解決方案
  1. 在 phpMyAdmin 中,選擇目標表。
  2. 點選「導入」標籤。
  3. 瀏覽並開啟您的 CSV 檔案。
  4. 將「字元集」保留為預設值。
  5. 取消選取「部分匯入」(除非您有一個巨大的資料集)。
  6. 設定以下四個欄位:
    • 終止的欄位:,
    • 包圍的欄位:「
    • 轉義的欄位:
    • 終止的行:auto
  7. 如果要覆蓋現有數據,請選取「用檔案取代表格資料」。 🎜>
  8. 您的CSV 檔案中的資料將成功匯入現有表中。

以上是如何使用 phpMyAdmin 將 CSV 檔案匯入現有資料庫表?的詳細內容。更多資訊請關注PHP中文網其他相關文章!

來源:php.cn
本網站聲明
本文內容由網友自願投稿,版權歸原作者所有。本站不承擔相應的法律責任。如發現涉嫌抄襲或侵權的內容,請聯絡admin@php.cn
作者最新文章
熱門教學
更多>
最新下載
更多>
網站特效
網站源碼
網站素材
前端模板
關於我們 免責聲明 Sitemap
PHP中文網:公益線上PHP培訓,幫助PHP學習者快速成長!