MySQL data import and export

1. Grammar

The data import and export syntax in MySQL is as follows:

Export:

SELECT  *  INTO  OUTFILE 'file_name' FROM  tbl_name ;

Import:

LOAD  DATA  INFILE  'file_name'  INTO  TABLE  tbl_name ;

Syntax analysis:

file_name
Target file or data source file;

tbl_name
Target table or data source table;