Skip to content

Instantly share code, notes, and snippets.

@shalaby
Last active March 30, 2022 10:59

Revisions

  1. shalaby revised this gist May 19, 2015. 1 changed file with 2 additions and 0 deletions.
    2 changes: 2 additions & 0 deletions importCSV.sql
    Original file line number Diff line number Diff line change
    @@ -1,3 +1,5 @@
    mysql -uroot -p --local-infile

    LOAD DATA LOCAL INFILE "file.csv"
    INTO TABLE db.table
    FIELDS TERMINATED BY ','
  2. shalaby revised this gist Mar 15, 2015. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion importCSV.sql
    Original file line number Diff line number Diff line change
    @@ -1,4 +1,4 @@
    LOAD DATA LOCAL INFILE "file.cvs"
    LOAD DATA LOCAL INFILE "file.csv"
    INTO TABLE db.table
    FIELDS TERMINATED BY ','
    ENCLOSED BY '\"'
  3. shalaby revised this gist May 7, 2014. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions importCSV.sql
    Original file line number Diff line number Diff line change
    @@ -1,5 +1,5 @@
    LOAD DATA LOCAL INFILE "xxx.cvs"
    INTO TABLE xxx
    LOAD DATA LOCAL INFILE "file.cvs"
    INTO TABLE db.table
    FIELDS TERMINATED BY ','
    ENCLOSED BY '\"'
    LINES TERMINATED BY '\n'
  4. shalaby created this gist May 7, 2014.
    5 changes: 5 additions & 0 deletions importCSV.sql
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,5 @@
    LOAD DATA LOCAL INFILE "xxx.cvs"
    INTO TABLE xxx
    FIELDS TERMINATED BY ','
    ENCLOSED BY '\"'
    LINES TERMINATED BY '\n'