MySQL DDL Column Edit is Disabled. Why?

Click For Summary

Discussion Overview

The discussion revolves around issues related to editing columns in MySQL Workbench while designing an Entity Relationship Diagram (ERD). Participants explore potential reasons for the disabled columns tab and seek solutions for enabling it, including the definition of primary keys and the use of different database clients.

Discussion Character

  • Technical explanation
  • Debate/contested
  • Exploratory

Main Points Raised

  • One participant reports that the columns tab in MySQL Workbench is disabled and seeks advice on enabling it.
  • Another participant asks which client is being used, suggesting that the issue may be client-specific.
  • Some participants note that similar issues occur in phpMyAdmin when a primary key is not defined for the table.
  • There is mention that MySQL Workbench does not allow editing of table data if no primary key is specified, while other clients like phpMyAdmin and HeidiSQL do allow it.
  • A participant expresses difficulty in selecting a primary key within MySQL Workbench.
  • Another participant suggests executing DDL code to create a primary key as a potential solution.
  • One participant requests a reference for executing DDL in MySQL Workbench, indicating they have not done it before.
  • A specific DDL command is provided to alter a table and add a primary key, along with instructions on executing the command.

Areas of Agreement / Disagreement

Participants express varying experiences with different database clients, indicating that there is no consensus on a single solution. Some participants agree that the absence of a primary key may be causing the issue, while others have differing experiences with MySQL Workbench and other clients.

Contextual Notes

Participants mention the lack of primary keys and the potential settings in phpMyAdmin that could affect editing capabilities. There are also references to the differences in functionality between MySQL Workbench and other database management tools.

WWGD
Science Advisor
Homework Helper
Messages
7,806
Reaction score
13,116
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.
 
Computer science 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
Samy_A said:
What client are you using?
Sorry, it is MySQL workbench. @cpscdave : I cannot even get to the point of choosing a PK for the table
 
Last edited:
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.
 
  • #10
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

Similar threads

  • · Replies 7 ·
Replies
7
Views
5K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 7 ·
Replies
7
Views
1K
  • · Replies 6 ·
Replies
6
Views
2K
Replies
4
Views
3K
Replies
7
Views
3K
  • · Replies 2 ·
Replies
2
Views
5K
  • · Replies 1 ·
Replies
1
Views
1K