The Object Browser contains a drop down listbox and a schemata explorer control.
Default Schema Listbox
The drop down listbox lists the schema that are available on the currently connected server. It is possible to select a schema to become the currently active schema using this facility.
This selector executes a USE
statement. Once set,
subsequent statements without schema qualifiers will be
executed against this default schema. Note that this will only
be set for the query session. If you wish to set a default
schema for multiple MySQL Workbench sessions, you will need to set
the default schema for the stored connection. To do this from
the Home screen click Manage Connections,
then in the Manage DB Connection dialog
set the desired default schema on the
Parameters tab.
DB
Schemata Explorer
This area allows you to explore the schemata available on the currently connected server.
A useful feature that was introduced in MySQL Workbench 5.2.9 is the ability to rapidly enter the names of columns, tables and views into the SQL Statement area. Double-clicking views, tables, and column names in the schemata explorer will insert the corresponding name into the SQL Statements area. This reduces typing significantly when entering SQL statements containing several tables, columns or views.
The Object Browser also features a context menu which can be displayed by right-clicking on, for example, a table. Right-clicking on a table would display the following menu items:
Select Rows - Limit 1000 - pulls up to 1000 records 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 allows editing. Data can be saved directly to the live server.
Copy to Clipboard - There are various sub-menus:
Name (short) - copies the table name to the clipboard.
Name (long) - copies the table name to the clipboard
in the form `schema`.`table`
.
Column Names - copies the column names to the
clipboard in the form `table`.`column1`,
`table`.`column2`,...
.
Select All Statement - copies a SELECT all columns statement to the clipboard in the form:
SELECT `table`.`column1`, `table`.`column2`, ... FROM `schema`.`table`;
Insert Statement - copies an INSERT all columns statement to the clipboard.
Update Statement - copies an UPDATE all columns statement to the clipboard.
Delete Statement - copies a DELETE statement to the
clipboard in the form DELETE FROM
`world`.`country` WHERE
<where_condition>;
.
Send to SQL Editor - provides similar functionality to Copy to Clipboard. However, this options inserts the SQL code directly into the SQL Statements panel, where it can be edited further as required.
Alter Table - displays the table editor loaded with the details of the table clicked on.
Create Table - launches a dialog to allow you to create a new table.
Drop Table - drops a table. All data will be lost if this operation is carried out.
Refresh All - refreshes all schemata in the explorer by resynching with the server.
Right-clicking on an empty area inside the object browser displays the following menu options:
Create Schema - this allows 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 - Simply synchronizes with the live server so that information with the schemata explorer is updated.