I'm trying to assign the primary key to a column called emailadress in phpmyadmin, and i've been getting the following error:
#1062 duplicate entry for key "PRIMARY"
This is the SQL-query it tried to run:
ALTER TABLE `dparts`  ADD `emailadress` TEXT NOT NULL  AFTER `surname`,  ADD   PRIMARY KEY  (`emailadres`(30)) KEY_BLOCK_SIZE = 30 USING BTREE;
I think it has something to do with the fact that I'm not using INT. But then again, why am I not allowed to use text instead of int? Can I get a primary key without having to use INT? If so, how?