Search code examples
mysqlmysql-workbench

MySQL Workbench - Modify database tables with records


I need to modify tables of a database that I did with MySQL Workbench, this database has several tables and all tables have user information, thousands of records.

Can I change this database with records from MySQL Workbench and then export all the changes again with all the amendments and records?

The changes I want to do is add new additional fields to some tables.


Solution

  • If you only want to add plus fields (columns?) you can do them without any export or import needed with either MySQL Workbench or SQL queries.

    MySQL change table: ALTER TABLE Syntax

    Or in MySQL Workbench right click on the table than click Alter table... Add the new columns than click Apply, this will add the new columns without hurting any already added data. You can also specify the default value.