"If a worker wants to do his job well, he must first sharpen his tools." - Confucius, "The Analects of Confucius. Lu Linggong"
Front page > Programming > How to Import a CSV File into an Existing Table in phpMyAdmin?

How to Import a CSV File into an Existing Table in phpMyAdmin?

Published on 2024-11-08
Browse:132

How to Import a CSV File into an Existing Table in phpMyAdmin?

Importing a CSV into phpMyAdmin using Existing Table Columns

Importing a CSV file into an existing database table can be done through phpMyAdmin. To avoid creating a new table, follow these steps:

  • Open phpMyAdmin and select the database.
  • Click on the target table and then navigate to the "Import" tab.
  • Browse and select the CSV file to import.
  • Configure the import settings as follows:

    • Format: CSV
    • Charset: Leave as-is
    • Partial import: Uncheck unless importing a very large dataset
    • Replace table data with file: Check if desired
    • Ignore duplicate rows: Check if duplicates exist in the CSV file
  • Set the following fields:

    • Fields terminated by: , (comma)
    • Fields enclosed by: "
    • Fields escaped by: \
    • Lines terminated by: auto
  • Click the "Go" button to initiate the import.

Using these settings, the CSV data will be imported into the existing table columns, overwriting any existing values or inserting new rows as necessary.

Latest tutorial More>

Disclaimer: All resources provided are partly from the Internet. If there is any infringement of your copyright or other rights and interests, please explain the detailed reasons and provide proof of copyright or rights and interests and then send it to the email: [email protected] We will handle it for you as soon as possible.

Copyright© 2022 湘ICP备2022001581号-3