When we misuse the MySQL database, causing some data in a data table to be lost, it is necessary to use the backup database, the lost part of the data export, import operations. The Navicat tool provides us with a data sheet import and export function.
1. Export Data Sheet
NAVICAT Export data Table A lot of format, increased support for Excel2007 or more versions, when the completion of a table, if there are hundreds or more data need to import MySQL database, we can first export the design of the data into an Excel table, and then to fill in the format, Finally, these filled data are then imported into the MySQL database.
Step 1: Click "Export Wizard" to select the type of table: Excel file
Step 2: Select where to place the exported table and store the exported Excel table in the appropriate location.
Step 3: Select the fields you want to export, by default all fields are selected
Step 4: Define additional options, it is recommended to tick the "include column headings" so that the exported Excel table data looks more complete.
Step 5: Click "Start" to perform the export
The exported data table looks like this:
Input data:
2 Importing data tables
In the exported Excel table, manually enter some data, and then import the table into the database.
Step 1: Run the Import Wizard to select the type of data to import
Step 2: Select a file data source
Step 3: Skip.
Step 4: Define some additional options for the source file, the first three options must be filled out correctly, otherwise you will not be able to complete the correct import.
[Column name line]: The row position where the data table field is located
[First Data row]: The source data in the imported data table starts from the first line
[Last data row]: The source data in the imported data table is from the end of the first line
Step 5: Select the target table or create a new table
Step 6: Define the source field and the Target field of the corresponding relationship, if the target field set the primary key, in this step must be checked, otherwise it will not import data normally
Step 7: Select the import mode, if it is a new table, we select the first item. You can choose different options depending on the situation. Here we choose the third item.
Step 8: Click "Start" to execute the import command
After the execution, we go to the database to verify:
In the We can see all the added data, in the lower left corner of the window there is a small row of buttons to note, where "+" and "-" is to insert and delete a record of the button, if you want to add a record, you can rest the cursor on the last row of the last value, and then press "tab" Key to add the data down in turn.
Test data using NAVICAT Import and Export table (reprint)