-type Possible values: Show Defines the type of the output file. In order for this to work properly the table needs to have keycolumns defined, or you have to define the keycolumns manually using the This parameter supports auto-completion. -fileThe output file to which the exported data is written. This parameter is ignored if true , SQL Workbench/J will create any needed directories when creating the output file.
-sourceTable
Defines a list of tables to be exported. If this switch is used, If you want to export tables from a different user or schema you can use a schema name combined with a wildcard e.g. This parameter supports auto-completion. Define the schema in which the table(s) specified with This parameter supports auto-completion. -typesSelects the object types to be exported. By default only TABLEs are exported. If you want to export the content of VIEWs or SYNONYMs as well, you have to specify all types with this parameter.
This parameter supports auto-completion. -excludeTables The tables listed in this parameter will not be exported. This can be used when all but a few tables should be exported from a schema. First all tables specified through This parameter supports auto-completion. -sourceTablePrefix Define a common prefix for all tables listed with When this parameter is specified the generated statement for exporting the table is changed to a This can be used when exporting views on tables, when for each table e.g. a view with a certain prefix exists (e.g. table This parameter can not be used to select tables from a specific schema. The prefix will be prepended to the table's name. -outputDir When using the-sourceTable switch with multiple tables, this parameter is mandatory and defines the directory where the generated files should be stored.
-continueOnError
When exporting more than one table, this parameter controls whether the whole export will be terminated if an error occurs during export of one of the tables.
-encoding
Defines the encoding in which the file should be written. Common encodings are ISO-8859-1, ISO-8859-15, UTF-8 (or UTF8). To get a list of available encodings, execute This parameter supports auto-completion and if it is invoked for this parameter, it will show a list of encodings defined through the configuration property Possible values are: Defines the line ending to be used for XML or text files. The default line ending used depends on the platform where SQL Workbench/J is running. This parameter supports auto-completion. -headerPossible values: If this parameter is set to true, the header (i.e. the column names) are placed into the first line of output file. The default is to not create a header line. You can define the default value for this parameter in the file workbench.settings. This parameter is valid for text and spreadsheet (OpenDocument, Excel) exports. -compress Selects whether the output file should be compressed and put into a ZIP archive. An archive will be created with the name of the specified output file but with the extension When exporting multiple
tables using the Defines an additional Possible values: For SQL, XML and Text export this controls how the contents of CLOB fields are exported. Usually the CLOB content is put directly into the output file When generating SQL scripts with WbExport this can be a problem as not all DBMS can cope with long character literals (e.g. Oracle has a limit of 4000 bytes). When this parameter is set to true, SQL Workbench/J will create one file for each CLOB column value. This is the same behaviour as with BLOB columns. Text files that are created with this parameter set to true, will contain the filename of the generated output file instead of the actual column value. When importing such a file using
All CLOB files that are written using the encoding specified with the When exporting CLOB or BLOB columns as external files, the filename with the LOB content is generated using the row and column number for the currently exported LOB column (e.g. data_r15_c4.data). If you prefer to have the value of a unique column combination as part of the file name, you can specify those columns using the When exporting CLOB or BLOB columns as external files, the generated files can be distributed over several directories to avoid an excessive number of files in a single directory. The parameter The directories will be created if needed, but if the directories already exist (e.g. because of a previous export) their contents will not be deleted! -filenameColumnWhen exporting CLOB or BLOB columns as external files, the complete filename can be taken from a column of the result set (instead of dynamically creating a new file name based on the row and column numbers). This parameter only makes sense if exactly one BLOB column of a table is exported. -append Possible values: Controls whether results are appended to an existing file, or overwrite an existing file. This parameter is only supported for text, SQL, XLS and XLSX export types. When used with XLS oder XSLX exports, a new worksheet will be created. -dateFormat The date format to be used when writing date columns into the output file. This parameter is ignored for SQL exports. -timestampFormat The format to be used when writing datetime (or timestamp) columns into the output file. This parameter is ignored for SQL exports. -localeThe locale (language) to be used when formatting date and timestamp values. The language will only be relevant if the date or timestamp format contains placeholders that are language dependent (e.g. the name of the month or weekday). This parameter supports code-completion. -blobTypePossible values: This parameter controls how BLOB data will be put into the generated SQL statements. By default no conversion will be done, so the actual value that is written to the output file depends on the JDBC driver's implementation of the Blob interface. It is only valid for Text, SQL and XML exports, although not all parameter values make sense for all export types. The type The type The types Two additional SQL literal formats are available that can be used together with PostgreSQL: When using The parameter value
The parameter value The parameter value This parameter supports auto-completion. -replaceExpression -replaceWith Using these parameters, arbitrary text can be replaced during the export. The search and replace is done on the "raw" data retrieved from the database before the values are converted to the corresponding output format. In particular this means replacing is done before any character escaping takes place. Because the search and replace is done before the data is converted to the output format, it can be used for all export types (text, xml, Excel, ...). Only character columns ( Possible values: If this parameter is set to true, values from These parameters define the values that should be exported for real <tt>boolean</tt> values. Both parameters must be specified. If only one of is provided, it is ignored. -showProgressValid values: Control the update frequence in the status bar (when running in GUI mode). The default is every 10th row is reported. To disable the display of the progress specify a value of 0 (zero) or the value How do I export data from MySQL workbench to excel?Method 2: Using MySQL Commands
The simple way to export data from MySQL is to use the inbuilt feature of extracting the data by using the SQL approach. This command exports the data into CSV format with the specified “delimiter” and “escape characters”.
How do I export SQL Workbench query results?Export Query Results to CSV with MySQL Workbench. Name the CSV file.. Choose CSV from the Format dropdown.. Choose an export location.. Click the Save button.. How do I export data from MySQL workbench?Create a backup using MySQL Workbench. Connect to your MySQL database.. Click Server on the main tool bar.. Select Data Export.. Select the tables you want to back up.. Under Export Options, select where you want your dump saved. ... . Click Start Export. ... . You now have a backup version of your site.. How do you save MySQL query result in a Excel file?If you require to save the results of your MYSQL query to a CSV or Excel sheet, you can do so with the help of 'INTO OUTFILE'. This saves the query result as a 'CSV'. You can open this CSV file in Excel and save it as a . XLS file as well.
|