MySQL Workbench

6.5.3 Result Data Export and Import

Export or Import data directly from or into the result set.

Export a Result Set

A result set in the visual SQL editor can be exported to common file formats including CSV, JSON, HTML, and XML. The following figure demonstrates the selection of JSON as the export type from within the Export Resultset dialog.


This wizard only exports/imports data from a result set. For an overview of the data export and import options in MySQL Workbench, see Section 6.5, “Data Export and Import”.

Figure 6.23 Exporting a Result Set

Content is described in the surrounding text.

Import into a Result Set

Records from a CSV file can be imported into the result set of the visual SQL editor.


The result set must have a unique row identifier (such as a Primary Key or NOT NULL unique index) as otherwise values can not be imported because the result set will be read-only.


Alternatively, use Section 6.5, “Data Export and Import” to export larger sets of data, such as entire tables and databases.