MySQL DDL Column Edit is Disabled. Why?

Join the discussion
Registration is free. Ask a follow-up in this thread, or start your own.
9 replies · 2K views
Messages
7,828
Reaction score
13,156
Hi All,
I am using MySQL in order to design an ERD (Entity Relation Diagram) , and I can make use of
indexes, triggers, etc. but for some reason, the columns tab , which allows me to add data or just edit the
tables is disabled. I have searched online without success. Any ideas on how to enable it ?
Thanks.
 
Physics news on Phys.org
WWGD said:
Hi All,
I am using MySQL in order to design an ERD (Entity Relation Diagram) , and I can make use of
indexes, triggers, etc. but for some reason, the columns tab , which allows me to add data or just edit the
tables is disabled. I have searched online without success. Any ideas on how to enable it ?
Thanks.
What client are you using?
 
  • Like
Likes   Reactions: WWGD
Do you have an pkey defined for the table?
I've noticed similar behavior in phpMyAdmin when a pKey hasn't been specified.
 
  • Like
Likes   Reactions: WWGD
cpscdave said:
Do you have an pkey defined for the table?
I've noticed similar behavior in phpMyAdmin when a pKey hasn't been specified.
Good catch.
WWGD said:
Sorry, it is MySQL workbench.
I tried it with a table with no PK. MySQL Workbench doesn't let me edit table data. phMyAdmin and HeidiSQL do let me edit table data.
 
Samy_A said:
Good catch.

I tried it with a table with no PK. MySQL Workbench doesn't let me edit table data. phMyAdmin and HeidiSQL do let me edit table data.

Maybe there is a setting in phpMyAdmin that disables this. I don't have any other admin tools installed currently so can't try them out :)
 
cpscdave said:
Maybe there is a setting in phpMyAdmin that disables this. I don't have any other admin tools installed currently so can't try them out :)
Thanks for your advice, cpscdave, but I cannot even get to choose a PK for the table.
 
WWGD said:
Thanks for your advice, cpscdave, but I cannot even get to choose a PK for the table.
My MySQL Workbench is friendlier, and let's me add the PK.

Can you execute the DDL code to create the PK?
 
Samy_A said:
My MySQL Workbench is friendlier, and let's me add the PK.

Can you execute the DDL code to create the PK?
Thanks, Samy_A, never done it before, could you please suggest a ref for how to do it? I know how to use DDL in general to create and populate (insert values into) tables, but I have never done it in MySQL workbench.
 
WWGD said:
Thanks, Samy_A, never done it before, could you please suggest a ref for how to do it? I know how to use DDL in general to create and populate (insert values into) table, but I have never done it in MySQL workbench.
Enter the code in a SQL panel:
SQL:
ALTER TABLE `test`.`nokey` 
CHANGE COLUMN `Column 1` `Column 1` INT(11) NOT NULL 
, ADD PRIMARY KEY (`Column 1`) ;
Click on the button with the lightning to execute the statement.
 
  • Like
Likes   Reactions: WWGD