php - preventing duplicate row insertion in mysql while importing csv file -


preventing duplicate row insertion in mysql while importing csv file.i want insert data mysql table via importing csv file. how prevent duplicate row insert?

create unique index in column might have dups, then

load data infile 'file.csv' ignore table table_name fields terminated ',' enclosed '"' escaped '"' lines terminated '\n'; 

Comments

Popular posts from this blog

Fail to load namespace Spring Security http://www.springframework.org/security/tags -

sql - MySQL query optimization using coalesce -

unity3d - Unity local avoidance in user created world -