Create columns in mysql from csv

Posted on 2012-08-31
Last Modified: 2012-09-07
Is it possible to create columns in a table in mysql based on comma delimited information in another file?
Question by:Jonathan CMCH
    LVL 25

    Expert Comment

    Do you mean
      - alter the table's structure based on the file; or to
      - add data into the table from the file?

    Author Comment

    by:Jonathan CMCH
    I would be altering the table.  I know I'm going to be scoffed at but I'm created a table that will host archived data which will be categorized by several hundred columns.  I've read where users have created dummy columns to import the data, but I haven't read anything where columns were created based on information in the CSV file.

    Hope that clears up the question.
    LVL 21

    Accepted Solution

    I think you need this to load csv data in to mysql.

    Featured Post

    6 Surprising Benefits of Threat Intelligence

    All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

    Join & Write a Comment

    I use MySQL for many of my development projects in a Windows environment. To manage my databases (and perform queries) for years I used a tool called MySQL administrator.  This tool has since been replaced by MySQL Workbench. So I decided to m…
    Load balancing is the method of dividing the total amount of work performed by one computer between two or more computers. Its aim is to get more work done in the same amount of time, ensuring that all the users get served faster.
    In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
    Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

    755 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    21 Experts available now in Live!

    Get 1:1 Help Now