Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SQL

mysql insert from local csv

LOAD DATA LOCAL INFILE 'abc.csv' INTO TABLE abc
FIELDS TERMINATED BY ',' 
ENCLOSED BY '"' 
LINES TERMINATED BY '
'
IGNORE 1 LINES
(col1, col2, col3, col4, col5...);
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #mysql #insert #local #csv
ADD COMMENT
Topic
Name
7+2 =