Created
January 27, 2013 07:29
-
-
Save ijmorgado/4647231 to your computer and use it in GitHub Desktop.
That's a small sql script to import a csv file without headers...just a bunch of data...I don't know why I had a trouble with the server when I tried other samples....
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
LOAD DATA local INFILE '/path/to/file.csv' | |
INTO TABLE name_scheme.name_of_table | |
FIELDS TERMINATED BY ',' | |
ENCLOSED BY '"' | |
ESCAPED BY '\\' | |
LINES TERMINATED BY '\n' | |
IGNORE 0 LINES | |
(field1,field2,field3,field4); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment