Hi All,

Ive just imported two CSV files into phpmyadmin, but i need to add an auto increment field into it, and then populate it.

Any advice on how to do this would be appreciated

After importing csv, run this query in sql tab of phpmyadmin.

alter table tbltest add id int(11) primary key auto_increment not null first;

Here tbltest is table name and id is auto incremented field.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.