The Object Browser contains an Actions list and a Schemata list, as seen in the following screenshot.
Object Browser Actions List
The Object Browser contains an Actions list. The actions are:
Execute SQL File: Opens an "Open File" dialog that enables you to select an SQL script to execute.
Add Schema: Enables you to add a new schema to your server.
Add Table: Enables you to create a new table via the new_table dialog.
Add View: Enables you to create a new view via the new_view dialog.
Add Routine: Enables you to create a new routine via the new_routine dialog.
The Schemata list shows available schemata on the currently connected server. These can be explored to show tables, views, and routines within the schema.
It is possible to set a schema as the default schema by
right-clicking the schema and selecting the Set
As Default Schema menu item. This executes a
statement so that subsequent statements without schema
qualifiers are executed against this schema. This setting
applies only to the query session. To set a default schema for
multiple MySQL Workbench sessions, you must set the default schema
for the stored connection. From the Home screen, click
Manage Connections, then in the
Manage DB Connection dialog, set the
desired default schema on the Parameters
A useful feature that was introduced in MySQL Workbench 5.2.9 is the ability to rapidly enter table, view, or column names into the SQL Statement area. Double-clicking a table, view, or column name in the schemata explorer inserts the name into the SQL Query area. This reduces typing significantly when entering SQL statements containing references to several tables, views, or columns.
The Object Browser also features a context menu which can be displayed by right-clicking an object. For example, right-clicking a table displays the following menu items:
Select Rows - Limit 1000: Pulls up to 1000 rows of table data from the live server into a Results tabsheet.
Edit Table Data: Pulls table data from the live server into a named tabsheet, and enables editing. Data can be saved directly to the live server.
Copy to Clipboard: There are various submenus, each of which copies information to the clipboard:
Name (short): Copies the table name.
Name (long): Copies the qualified table name in the
Column Names: Copies qualified column names the form
Select All Statement: Copies a statement to select all columns in this form:
SELECT `table`.`column1`, `table`.`column2`, ... FROM `schema`.`table`;
Insert Statement: Copies an
statement to insert all columns.
Update Statement: Copies an
statement to update all columns.
Delete Statement: Copies a
statement in the form
Send to SQL Editor: Provides functionality similar to Copy to Clipboard. However, this item inserts the SQL code directly into the SQL Query panel, where it can be edited further as required.
Alter Table: Displays the table editor loaded with the details of the table.
Create Table: Launches a dialog to enable you to create a new table.
Drop Table: Drops the table. All data in the table will be lost if this operation is carried out.
Refresh All: Refreshes all schemata in the explorer by resynchronizing with the server.
Right-clicking an empty area inside the object browser displays the following menu items:
Create Schema: Enables you to create a new schema on the connected server. You can apply your changes to synchronize with the live server by clicking the Apply button.
Refresh All: Synchronizes with the live server to update the information displayed by the schemata explorer.