Trying to at 900 entries to a table

Discussion in 'MySQL' started by marcusa007, Oct 26, 2008.

  1. #1
    I am new to mysql and I am trying to add 900 entries to a table all at one. One at a time is just to much pain. How can I accomplish this? Thanks
     
    marcusa007, Oct 26, 2008 IP
  2. mwasif

    mwasif Active Member

    Messages:
    816
    Likes Received:
    23
    Best Answers:
    1
    Trophy Points:
    70
    #2
    you can insert multiple records with a single INSERT query e.g.

    INSERT INTO table_name (column1, column2)
    VALUES ('val1', 'val2'), ('val11', 'val22'), ('val111', 'val222');
     
    mwasif, Oct 30, 2008 IP
  3. penalty

    penalty Member

    Messages:
    36
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    43
    #3
    or use a gui -
    try: http://dev.mysql.com/downloads/gui-tools/5.0.html

    are these 900 data sets raw data or do you have a csv excel ... file?
     
    penalty, Oct 30, 2008 IP
  4. marcusa007

    marcusa007 Active Member

    Messages:
    312
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    58
    #4
    marcusa007, Nov 1, 2008 IP
  5. sampathsl

    sampathsl Guest

    Messages:
    861
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Ok you can use some GUI tool such as MySQL admin or Navicat to do it. There is a facility called import excell data in both GUI tools.
     
    sampathsl, Nov 1, 2008 IP
  6. marcusa007

    marcusa007 Active Member

    Messages:
    312
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    58
    #6
    Just used the insert into command after I created the data set and all worked fine. Thanks for all the support.
     
    marcusa007, Nov 1, 2008 IP