I am working with phpmyadmin.I created a table with one primary key and 5 fields. But now all the integer fields have turned into a primary key. I tried using drop command but i
You may have indexed a column as a FOREIGN KEY, in this cas you should delete this index and then you will be able to modify or delete your PRIMARY KEY.
Here, i will tell you the Steps to do:
Step 1: Go to the Relation View.
Step 2: Indexes.
Step 3: You will find Keyname as PRIMARY.
Step 4: Drop the PRIMARY
Step 5: Ok.
Thanks.
Here all the Steps images, you can follow it for your easy.
Try this
ALTER TABLE tablename MODIFY fieldname INT NOT NULL;
ALTER TABLE tablename DROP PRIMARY KEY;
Just open up the Structure
tab on your phpmyadmin table. After the structure description, there should be a Indexes
section where you'll see all indexes, including your primary keys. There you'll be able to either modify or remove any primary key you may have defined.
---- EDIT ----