Error This table does not contain a Unique column

Asked

Viewed 96 times

1

When viewing the tables shows me this message:

This table does not contain a Unique column. Grid Edit, checkbox, Edit, Copy and Delete Features are not available.

I cannot change mysql data. You do not have the edit button.

Thank you

  • http://stackoverflow.com/questions/18748073/phpmyadmin-4-0-5-grid-edit-checkbox-edit-copy-copy-and-delete-features-are-not-a - http://stackoverflow.com/questions/18922503/resolution-this-table-does-not-contain-a-unique-column-edit-checkbox-ed

  • Tables I have none have unique data.

  • By clicking on the table row I want to put the primary key it affects something the rest of the BD?

1 answer

1

This table does not contain a single column.

You need to define a primary key (column differentiating one row from the other).

When you use the interface buttons, phpMyAdmin performs the changes via the primary key of the line in question. For example, when you change the value of a field, it runs SQL as in the template below:

UPDATE tabela SET campo = "valor" WHERE chave_primaria = "valor_da_chave_primaria"

Since the table does not have a primary key, it does not provide these buttons because it cannot perform the operation only on that line. If it tries another field, it can affect another line that has the same value.

  • When creating a column with ID and single key and put Auto increment it puts in the fields already filled?

  • Yes, he’ll fill them all

  • By clicking on the table row I want to put the primary key it affects something the rest of the BD?

  • No. If you want, you can do a test before. Copy the table or the entire database, add the key and see how it looks.

  • One of the tables gave an error: #1062 - Duplicate entry '1' for key 'Primary'

  • There are probably two lines that have the value "1" in the column you tried to add the key

  • Sub_id has no repeated value

  • The table has auto increment?

Show 3 more comments

Browser other questions tagged

You are not signed in. Login or sign up in order to post.