Search code examples
mysqlmysql-workbench

Adding new column via MySQL Workbench into existing table


I have existing table which is called person, I want to add via MySQL Workbench new column into it, for example column age. How can I manage this operation using this program, where and what I need to write?

I found query like this, should it works?

ALTER TABLE person ADD age INT(3);

Solution

  • I don't know if Stackoverflow is proper place to such question, but...

    Click on the table you want to change (using right mouse button) and choose "Alter table" (schemas and tables lists are on the left).

    enter image description here

    In the opened tab you can add or change columns (GUI is very simple and intuitive).

    enter image description here

    Don't forget to save changes by clicking "Apply".