Creating, Dropping, and Editing Tables
This topic describes ways to create, drop, and edit a table in a database with the help of dbForge Studio.
Creating a Table
-
On the Standard toolbar, click New Database Object and specify the Table type in the dialog.
- Input the table name.
- Click Create and, if specified name is unique, the table editor will appear.
- Add at least one column to the table.
- Optionally, alter the name, change database (owner) in which the new table will be created, or set comment for the table.
-
Save the document.
-or-
- In Database Explorer, right-click the Tables node and select New Table.
- Input the table name.
- Add at least one column to the table.
- Optionally, alter the name, change database (owner) in which the new table will be created, or set comment for the table.
- Save the document.
Note
To learn about adding columns, constraints, indexes to the table and defining other table parameters, see Defining Table Structure.
Dropping a Table
Drop a table by selecting Delete on the node shortcut menu.
Note
When you drop a table all data containing in it is lost.
Editing a Table
Editing a table implies editing its structure: changing, removing, or adding columns, indexes, modifying table options. Table editor allows performing all these actions and viewing changes in the script of the table.
To edit a table and view changes:
- Right-click it in Database Explorer.
- Select Edit Table on the shortcut menu.
- Make necessary changes in table structure. See topic Defining Table Structure for detailed information.
-
Click the Script Changes button to view changes.
Note
If you modify column names, a message asking if refactoring should be used, will appear.
- To apply changes, click Update Database. If you want to undo all actions made since table document (or any another object editor) was opened or saved, click the Undo button on the Standard toolbar. However, you cannot issue a Redo command for database objects, because when you click Undo, the database object is reloaded from server, and all unsaved changes are lost.
Want to Find out More?
Take a quick tour to learn all about the key benefits delivered by dbForge Studio for MySQL.
Get acquainted with the rich features and capabilities of the Studio in less than 5 minutes.
If you consider employing the Studio for your business, request a demo to see it in action.
Ready to start using dbForge Studio for MySQL?