Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

MySQL DDL Column Edit is Disabled. Why?

  1. Jan 19, 2016 #1

    WWGD

    User Avatar
    Science Advisor
    Gold Member

    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.
     
  2. jcsd
  3. Jan 19, 2016 #2

    Samy_A

    User Avatar
    Science Advisor
    Homework Helper

    What client are you using?
     
  4. Jan 19, 2016 #3
    Do you have an pkey defined for the table?
    I've noticed similar behavior in phpMyAdmin when a pKey hasn't been specified.
     
  5. Jan 19, 2016 #4

    WWGD

    User Avatar
    Science Advisor
    Gold Member

    Sorry, it is MySQL workbench. @cpscdave : I cannot even get to the point of choosing a PK for the table
     
    Last edited: Jan 19, 2016
  6. Jan 19, 2016 #5

    Samy_A

    User Avatar
    Science Advisor
    Homework Helper

    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.
     
  7. Jan 19, 2016 #6
    Maybe there is a setting in phpMyAdmin that disables this. I dont have any other admin tools installed currently so can't try them out :)
     
  8. Jan 19, 2016 #7

    WWGD

    User Avatar
    Science Advisor
    Gold Member

    Thanks for your advice, cpscdave, but I cannot even get to choose a PK for the table.
     
  9. Jan 19, 2016 #8

    Samy_A

    User Avatar
    Science Advisor
    Homework Helper

    My MySQL Workbench is friendlier, and let's me add the PK.

    Can you execute the DDL code to create the PK?
     
  10. Jan 19, 2016 #9

    WWGD

    User Avatar
    Science Advisor
    Gold Member

    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.
     
  11. Jan 19, 2016 #10

    Samy_A

    User Avatar
    Science Advisor
    Homework Helper

    Enter the code in a SQL panel:
    Code (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.
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook




Similar Discussions: MySQL DDL Column Edit is Disabled. Why?
  1. Disabling ACPI (Replies: 1)

  2. Disabled Right-Click (Replies: 5)

Loading...