Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SQL

How to import CSV file into a MySQL table

LOAD DATA LOCAL INFILE  
'c:/temp/some-file.csv'
INTO TABLE your_awesome_table  
FIELDS TERMINATED BY ',' 
ENCLOSED BY '"'
LINES TERMINATED BY '
'
IGNORE 1 ROWS
(field_1,field_2 , field_3);
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #How #import #CSV #file #MySQL #table
ADD COMMENT
Topic
Name
4+2 =