Home >Database >Mysql Tutorial >How to Import a CSV File into an Existing Table in phpMyAdmin?

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

Linda Hamilton
Linda HamiltonOriginal
2024-10-25 03:00:29308browse

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.

The above is the detailed content of How to Import a CSV File into an Existing Table in phpMyAdmin?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn