Skip navigation links

MySQL Forums :: Newbie :: IMPORT TABLE INTO MySQL


Advanced Search

IMPORT TABLE INTO MySQL
Posted by: Jason Kapalczynski ()
Date: April 20, 2009 09:35AM

I am trying to import a comma delimited txt file into MySQL database

I seen stuff like this, but being a Newbie I am confused.

load data local infile 'uniq.csv' into table tblUniq
fields terminated by ','
enclosed by '"'
lines terminated by '\n'
(uniqName, uniqCity, uniqComments)

1. First off I dont even know where to write the script in MySQL
2. Second it appears that I have to have an existing table to import into

The table I want to import has a bunch of fields...do I need to actually make the template table in MySQL first then import into that table...

I hope not...that seems a bit combersome...Cant I just import an existing file without having to create the table in MySQL first...

THanks in Avance...

Options: ReplyQuote


Subject Written By Posted
IMPORT TABLE INTO MySQL Jason Kapalczynski 04/20/2009 09:35AM
Re: IMPORT TABLE INTO MySQL Mark Snyder 04/20/2009 10:52AM
Re: IMPORT TABLE INTO MySQL Jason Kapalczynski 04/20/2009 02:47PM
Re: IMPORT TABLE INTO MySQL Mark Snyder 04/20/2009 02:56PM
Re: IMPORT TABLE INTO MySQL Jason Kapalczynski 04/21/2009 07:40AM
Re: IMPORT TABLE INTO MySQL Jason Kapalczynski 04/21/2009 07:53AM
Re: IMPORT TABLE INTO MySQL Mark Snyder 04/21/2009 09:39AM
Re: IMPORT TABLE INTO MySQL Mark Snyder 04/21/2009 08:04AM
Re: IMPORT TABLE INTO MySQL Jay Alverson 04/21/2009 07:59AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.