MySQL Workbench Manual  /  ...  /  Results Window

8.1.4 Results Window

The results area of the screen shows the results from executed statements. If the script contains multiple statements, a result tab will be generated for each statemented that returned results.


MySQL Workbench handles quoting and escaping for strings entered into the results grid, so adding quotes and proper escaping here is optional.


It is possible to enter a function, or other expression, into a field. Use the prefix \func to prevent MySQL Workbench from escaping quotation marks. For example, for the expression md5('fred'), MySQL Workbench normally would generate the code md5(\'fred\'). To prevent this, enter the expression as \func md5('fred') to ensure that the quoting is not escaped.

Figure 8.4 SQL Editor - Result Grid

The figure content is described in the surrounding text.

The result grid navigation panel offers the following options:

  • Reset: Resets all sorted columns.

  • Refresh: Refreshes all data by re-executing the original statement.

  • Filter Rows: performs a case-insensitive search of all cells. It automatically refreshes, and there is also the refresh button to perform this action manually.

  • Edit Current Row: Edit the current row.

  • Add New Row: Adds a new empty row, and highlights it in edit mode. Click Apply to execute (and review) the insert row query.

  • Delete Selected Rows: Deletes the selected rows. Click Apply to execute (and review) the delete query.

  • Export: Writes a result set to a CSV, HTML, JSON, SQL INSERT, Excel, XML, or Tab separated file as required.


    This exports a result set. To export an entire table or schema, see Data Export.

  • Import: Import records from an external CSV file.

  • Wrap Cell Content: If the contents of a cell exceeds the cell width, then the data will be cut off with an ellipses. This option will instead wrap the contents within the cell, and adjust the cell height accordingly.


    The "Refresh" button automatically adjusts the column width to match the longest string one of its cells. You may also manually adjust the column width.

Right-clicking on a results grid tab opens the following context-menu:

Figure 8.5 SQL Editor - Result Grid Context Menu

The figure content is described in the surrounding text.

  • Rename Tab: Customize the name (title) of this tab.

  • Pin Tab: Pin the results tab to the results grid. Executing additional SQL statements will create new result grid tabs.

  • Close Tab: Close this tab.

  • Close Other Tabs: Close all tabs except this one.

Right-clicking on a results grid field opens the following context-menu:

Figure 8.6 SQL Editor - Result Grid Field Context Menu

The figure content is described in the surrounding text.

  • Open Value in Editor: Opens a new editor window that specializes in editing Binary and JSON data, but can edit text.

  • Set Field to NULL: Sets the field value to NULL.

  • Mark Field Value as a Function/Literal: Marks as a function, by prepending \func.

  • Delete Row(s): Deletes the entire row.

  • Load Value from File: Opens a file dialog to insert a value from a file. The entire file contents are inserted into the field.

  • Save Value to File: Saves a field's value to a file.

  • Copy Row: Copy the row in escaped CSV format, in a form such as: 'a', 'b','c'. Alternatively, there is Copy Row (tab separated) to use tabs instead of commas as the separator, and Copy Row (unquoted) to not escape the values.

  • Copy Row (with names): Copy an escaped row like "Copy Row", but also adds a #comment containing column names. Alternatively, there is Copy Row (with names, unquoted).

  • Copy Field: Copies the field name, such as: 'a', or use Copy Field (unquoted) to not use single quotes.

  • Paste Row: Pastes the row over the currently selected row.

  • Capitalize Text: Capitalizes text in the current row, such as: Hello World.

  • lowercase Text: Lowercases text in the current row, such as: hello world.

  • UPPERCASE Text: Alters row to use all capitals, such as: HELLO WORLD.

User Comments
Sign Up Login You must be logged in to post a comment.