Skip to content

Instantly share code, notes, and snippets.

@oak-tree
Created February 8, 2016 15:37
Show Gist options
  • Select an option

  • Save oak-tree/e59415f634fcbaaf2414 to your computer and use it in GitHub Desktop.

Select an option

Save oak-tree/e59415f634fcbaaf2414 to your computer and use it in GitHub Desktop.
how to load csv file into mysql
LOAD DATA INFILE 'treksheb.csv' into table treks_heb
-> FIELDS TERMINATED BY ','
-> ENCLOSED BY '"'
-> LINES TERMINATED BY '\r\n'
-> IGNORE 1 LINES
-> (ProductId,name,Shortdescription,FullDescription,AttributeTypeId,CustomValue,DisplayOrder,SpecificationAttributeName,SpecificationAttributeOptionName);
@oak-tree
Copy link
Author

make sure to select database
make sure the file in inside data\{dbname}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment