MySQL includes two SQL statements that can be used to import data from files into your database or export data from your database into files:
The two statements are related in the sense that they both transfer information between MySQL and data files. Also, both statements use similar syntax for describing the format of data file contents. Data file import and export also can be performed from the command line. This is done using the mysqlimport and mysqldump client programs. For bulk data transfer operations, these programs act as command-line interfaces to the LOAD DATA INFILE and SELECT … INTO OUTFILE statements. Each program examines its arguments to determine what you want it to do, and then constructs appropriate SQL statements and sends them to the MySQL server on your behalf. |