Chris Carter wrote:

I have a database, which was till now, not having any primary key defined. I
thought I would not need it but now I think I do (based on the suggestions
from my prior postings). I am now trying to insert the primary key in an
already existing database. There was not even an index defined earlier
(sorry, if it looks strange). There are many columns that have same names
this means that I cannot make that column the primary key.

I have now got an idea to first define index on the table and then make the
index thing the primary key. I have mySql on cPanel. please advice how to
achieve this on an existing database in cPanel php admin.

Any link or steps would help. I tried it myself but there is something it
wants to tell me, that I am not sure about.

Most likely not everything can be done through phpmyadmin, however you can add your own primary key easily:

alter table tablename add id int not null auto_increment primary key;


Postgresql & php tutorials

PHP Database Mailing List (
To unsubscribe, visit:

Reply via email to