Created
April 15, 2014 17:26
-
-
Save bakertim/10750015 to your computer and use it in GitHub Desktop.
SQL: import local csv file
This file contains hidden or 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
mysql -u root -p --local-infile __DATABASE_NAME__ | |
-- SQL | |
LOAD DATA LOCAL INFILE '__relative_path_to_file' INTO TABLE __TABLE_NAME__ FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n' (field1, field2); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment