This table does not contain a unique column. Grid edit, checkbox, Edit, Copy and Delete features are not available

The error generated in phpMyAdmin is:

This table does not contain a unique column. Grid edit, checkbox, Edit, Copy and Delete features are not available.

What does this error message mean and how can I fix it?


Solution 1:

I have been faced with this problem.

The cause is your table doesn't have a primary key field.

And I have a simple solution: Set a field to primary key to specific field that suits your business logic.

For example, I have database thesis_db and field thesis_id, I will press button Primary (key icon) to set thesis_id to become primary key field:

enter image description here

Solution 2:

This is not an error. PhpMyAdmin is just informing you, that there is no unique ID column in your result set. Depending on the type of query you sent, this is the desired behaviour.

It is not MySQL which is saying it needs a unique ID, if any combination of the columns in your result set is unique, the values of those columns can be used in an UPDATE or DELETE query. It is phpMyAdmin which says it does not have enough information to offer you the checkboxes and buttons you will normally see in a result set with unique ID.